I'm running Windows 98 (just to get that out of the way).
I snagged a copy of C++ for Dummies from the library and was typing the first example program into Dev-C++. After numerous errors, I finally got the code right, but when I ran it, instead of displaying the text it was supposed to, it just showed "Press any key to continue..." I was sure I got the code right, so I figured it was the compiler's fault and just moved on.
About half-way through the first section of Chapter 2, I got inspiration to make a simple 'average of three numbers' program. The result:
// Program to find the
// average of three numbers
using namespace std;
int main(int nNumberofArgs, char* pszArgs)
cout << "This program will find the average of three numbers.";
// enter the numbers you want
// to find the average of
double valueOne; double valueTwo; double valueThree;
cout << "Enter the first number:";
cin >> valueOne;
cout << "Enter the second number:";
cin >> valueTwo;
cout << "Enter the third number:";
cin >> valueThree;
// calculate the average
// of the numbers
average = (valueOne + valueTwo + valueThree) / 3;
cout << "The average is:";
cout << average << endl;
(Let me add here that the displayed text came out as one line; if the solution is easy, could you let me know what it is?)
It looked pretty good to me and the IDE said there were no errors, so I tried to run it. It displayed "Press any key to continue..." and patiently waited for my input. By then it was starting to annoy me and I figured that I couldn't learn a programming language if I couldn't run any of my programs. So I went to a friends house (who's father programs as a hobby) and entered the same code in Visual C++ 6.0, and the program ran just fine ('cept the no breaks in the line, but that of course is because I'm an idiot).
So that is my problem. Is there a soulution? Maybe an alternate IDE (I could steal VCPP6 (<<is that a valid acronym?) from the friend?)?
I'll also add that the programs ran fine in debug mode (which I pressed by mistake).
Any help is appreciated.