Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple Problems
#1
I need to know the following:

1. How to pause a console application until a process has started
2. How to close the program after that process has started
Reply
#2
For first problem: http://social.msdn.microsoft.com/Forums/...b5d28c787/
Or: http://www.codeguru.com/cpp/misc/misc/co...php/c15893

Reply
#3
1: The general idea is to get input from the user to acknowledge theyre done with the program right?
You could do something like #include <conio.h> then use getch() at the end. but i think thats windows specific. Another OS specific way is system("PAUSE");

But the easiest way would be just to get input in traditional ways. Just use scanf() but make sure the stdin buffer is flushed.

2) exit(int status);
Reply
#4
(06-09-2011, 05:52 PM)BacklTrack Wrote: 1: The general idea is to get input from the user to acknowledge theyre done with the program right?
You could do something like #include <conio.h> then use getch() at the end. but i think thats windows specific. Another OS specific way is system("PAUSE");

But the easiest way would be just to get input in traditional ways. Just use scanf() but make sure the stdin buffer is flushed.

2) exit(int status);

You could also just throw a cin.get(); whenever you want a pause. It forces the user to press return.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)