patche
2002-02-12 19:42:24 UTC
I myself am a brand new DevCPP fan and am, like you, new to programming CPP. I am not sure where I got this but my list of resources has grown exponentially since the first of the year.
To "pause" a program so that I can see that it works I was told to add one cin.get() and if that didn't work to add cin.get() twice, like this:
#include <iostream.h>
int main()
{
cout<<"The Compiler Works";
cin.get();
cin.get();
return 0;
}
By the way I corrected your example, you had left the ";" out. Nitpicking aside I think the reason why it does that has something to do with the compiler reading a newline command into either [ENTER] key or "\n" and replacing them with "\0" the null symbol. Anyone, care to comment?
patche
To "pause" a program so that I can see that it works I was told to add one cin.get() and if that didn't work to add cin.get() twice, like this:
#include <iostream.h>
int main()
{
cout<<"The Compiler Works";
cin.get();
cin.get();
return 0;
}
By the way I corrected your example, you had left the ";" out. Nitpicking aside I think the reason why it does that has something to do with the compiler reading a newline command into either [ENTER] key or "\n" and replacing them with "\0" the null symbol. Anyone, care to comment?
patche