Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ Console app, Hello World! Problem

Name: Anonymous 2006-07-05 19:44

Im just starting C++ but i have got stuck straight away!

I have:

#include <iostream>
using namespace std;

int main()
{
    cout << "Hello World!\n" << endl;
    return 0;
}


It works fine, but just as it appears, it closes..and in the tutorial it shows the console with: 'press any key to continue...' under 'Hello World!'. Please Help!

Name: Anonymous 2006-07-06 4:33

>>6
TO explain:
Just drag and drop your .exe file onto the black command.com window you have open...

it will run your program and return you to the command prompt.
Thats if you are running windows... if you are using mac/linux just use VI and compile and run from there

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List