i finnaly decided to start learning c++, but i got stock right from the begging.
i entered this into c++
#include <iostream>
using namespace std;
int main()
{
cout<<"HEY, you, I'm alive! Oh, and Hello World!\n";
cin.get();
}
then saved it as a txt file opened it in dev, saved it and then clicked compile and run. then it just closes instantly. i can just bairly see a dos window and then it close.
i tried halting it with a while loop but that gaved me some cryptic error
int main()
{
cout<<"HEY, you, I'm alive! Oh, and Hello World!\n";
cin.get();
system("PAUSE");
}
Just curious, what did your while loop look like?
Edited by the Author.
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G
ISO standards say you should do "int main" and "return (whatever)" but most compilers don't care and just turn it into "void main" if you forget to "return"
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G