241 Topics
|
|
I am writing the following program that calculates the average of a group of test scores where the lowest score in the group is dropped. It has the following functions: void getScore()-should ask the user for a test score, store it in a reference parameter variable, and validate it. This … |
|
hi guys, I'm trying to implement a basic program which deals with structures and pointers. I have to insert data for various citizens, which is structure that have other structures as fields. in this case my main objective is to create 2 general functions that will get the information for … |
|
hello everyone i was wondering if anyone would be able to help me in an program i have to do. the program wants me to use my initials A and G and plot them on using gotoxy() function to make some thing that look like the picture in the link … |
|
Hi Would anyone know if there is a book explaining all the various C++ Libraries and what features they encapsulate? I'm thinking in terms of, for example: iostream -- then a list of features and functions in iostream etc. Could anyone suggest any books or good reference material for this … |
|
Hey guys. This is an assignment I've been given by my professor for a C++ course. The assignment description is below: [COLOR="Green"]Create a class ThreeDShape that has a default constructor and pure virtual functions double getSurfaceArea(), double getVolume() and void print(). Function getSurfaceArea() should compute and return the surface area … |
|
i am soryy my english is very bad but ill try my best to explain.i need help with my c++ assignemnt urgently. i want to create a frame and fit in this histograph(attached) which i made with the help of the container, where the x-axsis is the number from like … |
|
hi below is the code i am using to try and execute a pdf report. now the following code i saved in a separate file in the website folder itself. and in the form that contains the print button, when clicked i want it to execute the code in the … |
|
Hello, I have a problem. In my program i use structure: [CODE]struct pole { pole *pole1; pole *pole2; pole *pole3; pole *pole4; pole *pole5; pole *pole6; pole *pole7; pole *pole8; };[/CODE] I want to make a function which would use correct pole(pole1, pole2...pole8) depending on parametres |
|
[B]Here is the actual homework problem. I am stuck on parts 1 and 2 and I really don't know how to make this right. Any help is greatly appreciated.[/B] 1. Write a C++ program that reads following data from an input file called “in.txt”, And stores them to an array … |
|
|
I'm new to C Programming ( 6th week of an 8 week course ) and I am working on user defined structures. I have created a structure to store data received from a file and three of the four sub functions planned: open the file, store the data in the … |
so my project is due tomarrow and im stuck i need to some help. This is what i have it came up with some errors and i need to finish it. The conditions are TOTAL BALANCE and need to withdraw only multipule of 20 [CODE]// This is a program that … |
|
|
Ok, I have read several other questions basically asking the same thing, but I know this code can work instead of using other peoples work. Yes, i'm stubborn. I have written a function to be called from my main program and i keep getting an error that I cannot figure … |
It's saying I have 6 errors. Need help, please..or a push into the right direction. Thank-you. :) [CODE]#include <iostream> #include <cctype> using namespace std; int Len_String(char *); int CountCapitals(char *); int CountVowels(char *); int main() { char msg[] = "Strayer - what a University !"; char msg2[] = "Programming is … |
|
Hi I really need help figuring this one out I have been working at it forever. I am trying to pass an array of 3 pointers, which are themselves arrays, and get the sum of the last two pointers and store it in the first pointer. The pointerarrays are filled … |
|
ok so im doing a project for a class, no body but me is doing c++ for it, im the only one in my school that knows some of it, and heres what i have so far, havnt gotten into too much detail for it because i need to know … |
|
struct Employee { /* Employee details */ char name[MAX_NAME_LENGTH+1]; /* name string */ char sex; /* sex identifier, either 'M' or 'F' */ int age; /* age */ char job[MAX_JOB_LENGTH+1]; /* job string */ struct Employee *prev, *next; }; static void menu_add_employee(void) { static struct Employee *employee_list = NULL; { … |
|
In a C++ function How to check if the minimum and maximum values of an array are not equal and the minimum and maximum values of the array are not adjacent to one another. Also the minimum value occurs exactly once in the array and the maximum value occurs exactly … |
|
[CODE]#include<stdio.h> #define CR 13 #define LF 10 int main() { FILE *tg; FILE *th; FILE *printer; int i,a; char input[20]; char file[100]; char input2[20]; char file2[100]; printf("Enter the file name for reading : "); scanf("%s",input); th = fopen(input,"r"); printer = fopen("PRN","w"); do { i=fgets(file,100,th); putc(i,printer); printf("\n\n%s",file); }while(i != EOF); printf("Enter … |
|
" fscanf " plzz help me the format of this function and brief explanation?????? plzzzzz help ...... needed...... |
|
Hi, I have been working on this program for quite some time but I can't figure out what's wrong with it. The program compiles and this is the the output I get: ?Invalid number of arguments Press any key to continue . . . Can somebody please take a look … |
|
Hi everyone I am trying to write a program that will allow to people to play tic tac toe. My constraints are that this must be accomplished mainly through the use of functions and that the default cell field for the displayed game board must be stars. I am having … |
|
ok so i need to create a cell class for a tic tac toe game. the cell class should have a row, column coordinate, and an internal and external display value. heres what i have so far. can anyone give me some hints or point me in a direction where … |
|
I am very very blurry about when to use pointers or not. I am writing a function (given below), and trying to pass in two variables, statenumber and state. I have them being passed in as chars, and not char *s. I get error messages both ways. I dont know … |
|
I have a general doubt regarding passing pointers to functions... Suppose i have variable [code=c]tc_struct *ptr;[/code] and i want to pass it to a function to fill it. So i passed it [code=c]func(&ptr);[/code] and i received it in func as [code=c]void func(tc_struct** ptr1)[/code] Now again i want to pass this … |
|
The following is output from an unknown command off an old school DEC Ultrix machine. Does Linux have a similar command/tool? Thanks, Kent 1 pend_nonpayment: int(), <pend_nonpayment.c 79> 2 usr_pwd: <> 3 display_error: <> 4 clears: <> 5 paint: <> 6 current_date: <> 7 get_process_date: <> 8 strcpy: <> 9 … |
|
Hi guys! I'm pretty new to C++. I am currently on freshman year at college, and have a programming problem (not homework, it's actually a side project of mine) that consists on implementing some algebra-related functions on C++. I'll go straight to the point: [code] int switchlines(int i, int j, … |
|
Hi all, I have seen code of the form: [code=php] if(file_exists("foo.php") include("foo.php"); else include("blah.php"); [/code] As far as I know, this is perfectly legal in php. What I was wondering was is it possible to do the following in in-line code in PHP? [code=php] if(file_exists("foo.php") // contains a specialised version … |
|
while syntactically templates cannot be virtual functions, I wonder what approach to use when semantically this is what someone wants to do. for example, in my case I want to have a virtual function, because I'm using sub-classes while having a pointer to the base class, but I also want … |
|
OK, so I have this project to do and cant figure it out. I am not positive on calling functions correctly and I am kind of lost when it comes to parameter passing. So my program needs to read a text file 1 integer at a time, find out if … |
|
I am sorry to ask such a beginner question: I am just learning to use classes and objects in php and would like to know one simple thing - how to you reference one function (or should I call them methods?) from another within the class. When I specify a … |
The End.