49,761 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
hai can anyone please tell me whether it is possible to make graphics work in borland c++? thanks Tresa | |
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 … | |
[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 … | |
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 … | |
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 +, + … | |
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; … | |
[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, … | |
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 … | |
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 … | |
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: … | |
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: | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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> … | |
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 | |
[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 … |
The End.