View Single Post
  #4 (permalink)  
Old June 20th, 2007, 09:28 AM
TotcoS TotcoS is offline
Registered User
 
Join Date: Jun 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to TotcoS Send a message via MSN to TotcoS Send a message via Yahoo to TotcoS
Default

Quote:
quote:Originally posted by ZORCH
 I'm having a very difficult time with my compiler- Dev-C++ the problem is when I compile something like this


// my first program in C++

#include <iostream>
using namespace std;

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

my comand line doesn't even come up for a second. I know there is such thing as system("pause") but I don't no how to run it through the script can somebody show me how to do this with that simple script above? Thx,

If all you want is a pause without the "Press any key to continue . . ."
Code:
#include <iostream>
using namespace std;

int main() {
  cout << "Hello, World!";
  system("PAUSE >> NULL");
  return(0);
}
-OR-
Code:
#include <iostream>
using namespace std;

int main() {
  cout << "Hello, World!";
  cin.get();
  return(0);
}
Happy Coding,
Scott Stauffer aka TotcoS of BlackHat-Forums.

I don't need a signature =D
Reply With Quote