I'm very new to C++
in C you put system("pause") at the end before return 0.
How do you do that in C++?
I have my answer Thanks
I'm very new to C++
in C you put system("pause") at the end before return 0.
How do you do that in C++?
I have my answer Thanks
Last edited by Vorkosigan; 01-22-2004 at 02:41 PM.
same thing
source: compsci textbooks, cboard.cprogramming.com, world wide web, common sense
Code:#include <cstdlib> int main() { system("pause"); return 0; }
Vorkosigan,
FYI - 99% of what you do in C, will work in C++. But, sometimes (probably most-times) there is a "better" C+ way.
And in this case, in C and C++ there is a better way. Search the board for system("pause")Originally posted by DougDbug
Vorkosigan,
FYI - 99% of what you do in C, will work in C++. But, sometimes (probably most-times) there is a "better" C+ way.
Definition: Politics -- Latin, from
poly meaning many and
tics meaning blood sucking parasites
-- Tom Smothers
or read the faq
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
So is that why its bad to use system calls. Its platform specific?
Warning: Opinions subject to change without notice
The C Library Reference Guide
Understand the fundamentals
Then have some more fun
Platform specific, plus "pause" might point to something else, that could be malicious.
plus you made an expensive call to the operating system. Slower, more resources used, chance to fail. Any more questions?
Definition: Politics -- Latin, from
poly meaning many and
tics meaning blood sucking parasites
-- Tom Smothers