49,761 Topics
| |
This is kinda like "part 2" of my other post. Have also been working on this one for about 3 weeks. A suggestion was made that I should consider using the map container to accomplish what I want. My textbook doesn't talk about maps but I found some info on … | |
I've been fighting w/ this problem for about 3 weeks. My school's forum and another programming forum I belong to have been unable to help me (I can't get ahold of my instructor but the school is looking into that). When running the attached program, I get the errors /home/cody/Projects/wavelength/src/wavelength.cpp:19: … | |
I'm trying to complete the following problem: write a problem that generates a table showing tuition and fee costs. the table continues to print up to and including a maximum number of credits that has been input by the user. The program should check that this value is between 12 … | |
[font=VERDANA, ARIAL, HELVETICA, SANS-SERIF][size=1][font=VERDANA, ARIAL, HELVETICA, SANS-SERIF][size=1][font=VERDANA, ARIAL, HELVETICA, SANS-SERIF][size=1]Having bugs in your code may be unavoidable, but crashing [i]*is*[/i] avoidable. Barring cosmic rays playing yahtzee with your memory there is no reason why your program should ever crash. Crashing is totally avoidable![/size][/font] [font=VERDANA, ARIAL, HELVETICA, SANS-SERIF][size=1]What do I mean … | |
Can anyone tell me the complete algorithm analysis of Tower of Hanoi for n pegs and n disks.I really need it :sad: | |
Hey everyone. I actually have a homework assignment that is due Tuesday afternoon that I've been struggling all weekend with. The assignment is located at: [url="http://cs.hofstra.edu./~cscsxd/hofstra/teaching/cs155-04/course_info/project/Recursion.cpp"]http://cs.hofstra.edu./~cscsxd/hofstra/teaching/cs155-04/course_info/project/Recursion.cpp[/url] As you can see, the function we have to write is: [code]int *Rectangular_Shortest_Path(int startx, int starty, int endx, int endy, int r[][6], int a[][6]) … | |
hi , i need a program for tollbooth simulation using arrays implementing queues in C++. can some one please help me out. prashant | |
Hi, There are many versions of C and C++ built by many different companies. So, which version : 1. more easier to learn 2. more easier to remember 3. more easier to debug 4. helps me find errors fast and professionally 5. more portable 6. has the biggest community 7. … | |
Hi there, I recently recieved some intructions to make a program using a "do while loop". Here is the questions below....by the way i am very new to C++: "Your program begins by randomly assigning the user an amount of money (from $1 - $1000), and then after each round, … | |
I am having trouble coming up with code for removing a node in a binary search tree. This is what I have so far: [CODE] void remove(int n) { node *current=root; node *gptr; while(current != NULL){ if(n<current->key){ gptr=current; current=current->left; }else if(n>current->key){ gptr=current; current=current->right; }else if(n==current->key){ if(gptr->right->key==n){ cout<<"1st ==key = "<<gptr->key<<endl; … | |
I am writing a turtle graphics program and I need help with 2 characters to show when the direction of my turtle is up or down. I am using cout << ">"; cout << ">"; for right and left and right directions. Any help will be greatly appreciated since my … | |
Hi I've been asked to write a program for this figure 1234 2 3 3 2 4321 I have tried writing this,don't know if its correct or not :?: my program is #include <iostream.h> void main() {int n,r,c; cout<<"enter the value of n"<<endl; cin>>n; for(r=1;r<=n;r++) c=r; cout<<c; cout<<endl; for(r=2;r<n;r++) for(c=2;c<=r;c++) … | |
OK PEOPLE I NEED HELP AGAIN........pls dont do my homework..........thats y i havnt given the question this time aroung :) the question im asking is simple : the program asks user to input product id ( a,b,c,d or e) and its quantity sold......it then saves total sale in "int sale" … | |
[IMG]http://img.villagephotos.com/p/2004-8/807060/resultwanted.JPG[/IMG] the picture shows the result i wanna achieve but my program here which i modified: [CODE] #include <iostream> using namespace std; int main() { int k, m; for(k = 1; k <= 10; k++) { for(m = 0; m < k; m++) cout << "*"; cout << endl; } … | |
static void myInit() { PrimitiveType=GL_POLYGON; LineSegments=3; } can someone tell me what static does to the function? | |
i am a beginner, and i have 4 questions but i will only ask 2, 1. i have an assignement that says, write a program that will display one of three user-selected shapes, ('T'=triangle, 'D'=diamond, or 'R'=rectangle and 'X' to terminate). using a switch statement. please help me with the … | |
Greetings: I am taking my first C++ class and am a little stuck. I keep receiving three compiler errors, but I can't seem to figure them out. Can someone please point me in the right direction. The assignment is: Write a C++ program having a recursive function recursiveMinimum that takes … | |
How would I create a method like toString() within the SHA-1 class to convert a message digest to a C++ string, each representing a hexadecimal digit. Also, how could specify whether a file should be read as a text file or binary file? Thanks | |
hey all, what would be the calculations needed for making a simple sprite opject point towards the cursor position? ta | |
Which file supposed to replace the file crtdbg.h in embedded c++? Is it possible that I don't have it in the embedded c++ environment? I'm trying to convert a project that wrote in visual c++ to Embedded visual c++? | |
I'm about to kill myself... This is very elementary stuff, yet I still can't do it. Let me first give you the code and then explain my problem : [CODE] wordListIterator = wordList.begin(); list<string>::iterator wordListNextIterator = wordList.begin(); wordListNextIterator++; while(wordListIterator != wordList.end()) { /* Counting duplicates */ int count = 1; … | |
[CODE] //Program to collect and hold data on CD's #include <iostream> #include <fstream> using std::cout; using std::cin; using std::endl; using std::ifstream; int main() { int QA; cout << "To veiw file press v, to add a new CD press a:\n"; cin.get(QA); if (QA == v) { while (CDs.get(ch)) cout.put(ch); } … | |
i don't know how to get some of the codes. how do u load an array code //C++ Program to demonstrate basic array function operations #include<iostream.h> const int ARRAY_SIZE = 5; void LoadArray(int a[ ], int size); void DisplayFirstToLast(int a[ ], int size); void DisplayLastToFirst(int a[ ], int size); int … | |
How can we print the output of the program(which is in the black environment, dos form)in the c++ visual studio 6 compiler? | |
I'm not sure how to get started with this. Here's the assignment and what i've done so far, but I'm not sure if i'm going the right direction with this. The assignment says to have the user enter input one character at a time. That means one letter or space … | |
Here is my problem. My code consist of two edit boxes: IDC_BOX_1 and IDC_BOX_2. and one button to Execute. The idea is for someone to enter a number in the first edit box, IDC_BOX_1, and after pushing the Execution button, the number in IDC_BOX_1, gets multiplied by two and displayed … | |
Hi, i wanted to overload a + operator to add two objects..i have an error which states "invalid operands `employee *' and `employee *' to binary `operator +'".. i do not know what is wrong with that statement, can anyone pls point out my mistake?? Thanks. the problem lies with … | |
hey i was wondering if someone could help me with this problem. i am so incredibly and utterly confused. here it is... write a simple phone directory program that looks up phone numbers in a file containing a list of names and phone numbers (called input.txt). the user should be … | |
I've written programs for averaging lists of exam grades but throwing in the percent is throwing me for a loop. I don't know how to handle this information. Any help will be greatly appreciated. > //Write a program that asks the user to enter a student's midterm > //and final … | |
Hi, I am very new to this forum and i have a problem with my C assignment. Im using Borland C++ 4.52 and i keep getting an error saying: General Protection Exception 0x241F:0X41C1 NONAME02(1)0X241F:0X41C1 Processor Fault It not the computer its the code at least thats what i figured because … |
The End.