
March 13th, 2008, 08:14 AM
|
 |
Contributing User
|
|
Join Date: Dec 2007
Posts: 1,169

Time spent in forums: 1 Week 1 Day 19 h 6 m 5 sec
Reputation Power: 7
|
|
|
system("pause");
has the same effect as when you use pause on the command line or in a batch file; it waits until the user presses a key.
Also, note that while your program is waiting, it's "spinning" the cpu at 100%.
Just use Sleep();
At the very least, call Sleep(1) in the loop, such that it only checks each 1 ms, or do sleep(seconds*1000)
system.pause() sounds like a .net thing, of which I have no idea.
|