[Dev-C++] RE1: Problem running programs
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Martin C. <mar...@ho...> - 2003-02-16 09:08:41
|
Hi Delbert,
One solution - and a common one - is to add:
cin.get();
just after you produced your output. That will make the system wait for a
keystroke - return - from cin - aka your keyboard. See below for a simple
Hello, World ! program that uses this technique. Another solution is the one
used in the Hello.dev example project that comes with Dev-C++.
Hope this helps.
Martin
#include <iostream>
using namespace std;
int main() {
cout << "Hello, World!" << endl;
cin.get();
}
_________________________________________________________________
Send søde postkort til søde mennesker http://www.msn.dk/postkort
|