49,761 Topics

Member Avatar for
Member Avatar for darksea_99

I am looking into trying to buiild an onscreen display model based on field data to look at the factors that control the feeding and foraging of the northeern right whale - some have suggested that i use C++ and others Visual Basic. I need some help. The work would …

0
90
Member Avatar for jasweb2002

Hey everyone, I just started writing this program when I hit a problem with the destructor. Me and my buddies in the lab could not figure out what is going on. The error said something about symbol referencing error and refers to the destructor. The program is set in three …

Member Avatar for jasweb2002
-1
78
Member Avatar for toadie2004

this is my assignment 1) Write a C++ program to calculate the average test scores for 10 students. The test scores are stored in a file named 'scores.dat'. The average along with the test scores should be written to an output file named 'results.txt'. The input file 'scores.dat' contains three …

Member Avatar for Narue
-1
128
Member Avatar for smarkles

Hello, I'm doing a project for C++ using OPengl. I have the Super Bible and tried doing just the "simple program". I'm getting a l inking error. I used Win32 Console. Opengl is already installed, so I just downloaded Nate Robins glut llibrary and installed it as directed. What am …

0
103
Member Avatar for skamen

Hi, I'm working an a project that must take a text file (provided to us, in.txt) that has the scores of students from different sections on different labs. You can view the assignment page at: [url]http://www.cs.wmich.edu/~nelson/CS111FALL04/lab06/index.htm[/url]. The problem I'm having is that I can't think of how to make a …

Member Avatar for skamen
0
132
Member Avatar for bryan7890

program that asks user to input 12 numbers of any type or domain (i.e. positive or negative) and record user's responce into an array. Process the input by manipulating it so that the numbers are arranged in the array in an ascending order (e.g. -1.2, -1, 0, 3, 4, 4.05, …

Member Avatar for bryan7890
-1
111
Member Avatar for Tresa

hai can anyone please help me find the error in my program? when i try to compile it says case bypasses initialisation of local variable. i can't figure out the mistake. i am sitting with this for a week. i will be thankful if someone could help me figure it …

Member Avatar for alc6379
-1
85
Member Avatar for hill0ster

[QUOTE]I am having two problems with this code. #1) The user is to enter a three digit number for their employee ID. No problem there. But if the user enters a negative number, such as -1 the program is to end and display the total payroll for the month, total …

Member Avatar for alc6379
0
150
Member Avatar for kazmoney

All right, I have an assignment for this introductory C++ class, and I'm sorry if this sounds silly, but I really don't know where to begin. We've just now gotten through the different kinds of loops and nested loops and that sort of thing, and my assignment is to write …

Member Avatar for Narue
0
126
Member Avatar for Asif_NSU

I have to insert a node in a binary search tree. This is what i wrote for the InsertNode() method. But it keeps producing segmentation fault when i run the program. I couldnot find anything wrong in the code. The constructor for TreeNode(int x) sets the item to x, leftchild …

Member Avatar for Asif_NSU
0
81
Member Avatar for knucklehead

I'm having trouble with a program to calculate a triangles area using fstream. The problem is I need the program to open the function to calculate the area in a file ("project3_1.dat") and to read in another file with coordinates of triangles. I wrote what I could in my program …

Member Avatar for Narue
-1
144
Member Avatar for Tresa

hai can anyone please tell me whether it is possible to make graphics work in borland c++? thanks Tresa

Member Avatar for Narue
0
118
Member Avatar for N3wbi3C0d3r

I learn faster when i have a motive to learn. Well if i have a project that uses all of the tutorial i use, i will be motivated to read sections and use it and make a full on project. I use [url]http://www.cplusplus.com/doc/tutorial/[/url]. If anyone can conjure up a HUGE …

Member Avatar for N3wbi3C0d3r
0
136
Member Avatar for hill0ster

[QUOTE]I am having two problems with this code. #1) The user is to enter a three digit number for their employee ID. No problem there. But if the user enters a negative number, such as -1 the program is to end and display the total payroll for the month, total …

Member Avatar for Chainsaw
0
90
Member Avatar for JoBe

Hi, I just wanted to ask if someone could give me a name of a good book in wich the mathematical formulas are written down with some explanation about them :?: Reason I ask is, I'm going to evening school to learn C++ but in using C++ I encounter very …

Member Avatar for JoBe
0
396
Member Avatar for dcving

Everything works well, but I couldn't figure out how to use the else statement in case the user inputs 0 as a number..any comments/suggestions? [code] /* Program description: Create a program that prompts for two integer values. The program will display whether the integers are either: - and +, + …

Member Avatar for Narue
-1
113
Member Avatar for boujibabe

I am a student with an assignment to wirite a program that makes change but i am not getting the correct output what am i doing wrong? [code] #include <iostream> using namespace std; //function prototypes int change1(float); int change2(float,float); int change3(float,float); int change4(float,float); int main() { //declare variables float Purchase=0.0; …

Member Avatar for Chainsaw
-1
87
Member Avatar for roodope

[code] #include <iostream> #include <fstream> #include <string> using namespace std; const int MAXSIZE = 5000; double maximum(double nums[], int size); double combineMax(double max1, double max2, int size1, int size2); int main() { string inputFileName1, inputFileName2; ifstream ifp1, ifp2; ofstream ofp; double *num1 = 0, num2[MAXSIZE], *tmpPtr; int ctr1 = 0, …

Member Avatar for Narue
-1
117
Member Avatar for hopeolicious

I dont know what they mean by undetermined character constant [code] #include <iostream.h> #include <stdlib.h> class student { char st_name[25]; char st_major[25]; int i_test1; int i_test2; int i_test3; int i_average; char ch_grade; char ch_option; public: void getdata(); void processdata(); void putdata(); }; int main() { do{ student.getdata(); student.processdata(); student.putdata(); cout …

Member Avatar for vegaseat
0
275
Member Avatar for mdos

I was recently given a list of possible C++ interview questions by a recruiter for a firm on Wall St. One of the questions was: [b] How would you generate a compile time error if the sizeof(int) is not equal to 4? [/b] I was thinking along the lines of …

Member Avatar for Narue
0
350
Member Avatar for debashish

I am very new to c/c++ programming. i was writing a few lines of code and after compiling and running the program i did not receive the desired output. can you please help me in this matter. /* Test.c */ #include <stdio.h> main() { char i[30]; clrscr(); printf("Enter a name: …

Member Avatar for frrossk
-1
113
Member Avatar for anthmaina

i got this code segment frm a bk...but am not understanding it....help me out... :?: int place[4][3]={{1},{1,2},{1,2,3},{1,2,3}}; int row,col; for(row=0;row<4;row++) { cout<<'\n'; } for(col=0;col<3;++col) { cout<<setw(3)<<place[row][col]; } :rolleyes:

Member Avatar for Narue
-1
131
Member Avatar for onsbomma

Hello I know this is not good code, but i was wondering why dubble delete gives an error (not an exception!!) and dubble free doesn't?? If new/delete works like malloc/free. Is the error caused by the destructor?? and if so why??? [code] Integer *m = (Integer*)malloc(sizeof(*m)); free(m); free(m); Integer *m …

Member Avatar for Narue
0
129
Member Avatar for sweety

Hi..this is a program to find if the no. is prime and to find the factorial of a given no. i have validated this program ..so that it gives an error message and [U]exits[/U] when negative nos. or zero are given as input. Instead of exit..i want to display the …

Member Avatar for sweety
0
85
Member Avatar for rajistephen

hai friendz, I am a Bioinformatics Masters degree student. I am doing my final semester project in the topic Molecular Docking on C++ in Linux platform. During the programming I felt a problem in calling/executing a progam in to my program. I have to call a program which accept a …

Member Avatar for rajistephen
0
107
Member Avatar for Flawless

How can i declare an array with variable size? i dont want it to be dynamic array, it have to be static. I mean the following: [code] int size; cin>>size; float array[size]; [/code] the previous code when compiled gives me that a constant expression required for the array declaration, although …

Member Avatar for Chainsaw
0
140
Member Avatar for roxanab

Hi. My name is Roxanne and I am a C++ / C# programmer. In the company that I’m working at, we are programming a business program for the customers and the software have been done in Visual C++ 6.0 I have to create and add to the software a new …

Member Avatar for Chainsaw
0
88
Member Avatar for hill0ster

I can't seem to get this code to displayEmployeeInfo if the user enters a negative number for ID. Also I can't seem to get a total of all wages to display. Any helpful hints would be greatly appreciated. Thank you! [code] #include <iostream> #include <iomanip> using namespace std; #include <string> …

Member Avatar for Chainsaw
0
134
Member Avatar for tushark

Hi all, when does the memory gets allocated to the function i.e. at compile time or at run time. If its at compile time the how is it? Thanks Tushar

Member Avatar for Chainsaw
0
123
Member Avatar for Alfy

[code] #include <stdio.h> int i,type; int buffer[100],line[50]; struct student { char name[20]; int age; int id; }; struct student students[3]; int main() { for(i=0;i<3;i++) { printf("please enter your name:\n"); fgets(students[i].name,sizeof(students[i].name),stdin); printf("please enter your age:\n"); fgets(buffer,sizeof(buffer),stdin); sscanf(buffer,"%d",&students[i].age); printf("please enter your id:\n"); fgets(buffer,sizeof(buffer),stdin); sscanf(buffer,"%d",&students[i].id); } while(1) { int *ptr=students; printf("Please enter the …

Member Avatar for Narue
0
143

The End.