| | |
"Press any key to continue" type function?
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
I just can't fathom why truly brain-dead things like system("PAUSE") keep being taught.
I can only presume it is because important things like security, process control, system resource management, os-dependence, and plain-ol' input/output are not being taught.
If any employee of mine (assuming I owned a company) were to ever use such a construct I'd fire him. Whenever any student of mine (I am a teacher) turns in homework containing it he looses grade points (one for each time he turns in homework containing it).
Oh, apparently I also have to mention that this thread is over a year old...
(I regret having ever suggested that it can be used for any reason at all... even stupid stuff.)
Makes me want to unplug your computer with a pair of dikes.
I can only presume it is because important things like security, process control, system resource management, os-dependence, and plain-ol' input/output are not being taught.
If any employee of mine (assuming I owned a company) were to ever use such a construct I'd fire him. Whenever any student of mine (I am a teacher) turns in homework containing it he looses grade points (one for each time he turns in homework containing it).
Oh, apparently I also have to mention that this thread is over a year old...
(I regret having ever suggested that it can be used for any reason at all... even stupid stuff.)
Makes me want to unplug your computer with a pair of dikes.
>he wants something platform independant. That only works on windows.
It's easy to make
This concept works on pretty much any system too, as long as you make sure that your pause program has priority over any other pause programs on the system.
...
Oh wait, this gaping security hole is precisely why I strongly suggest you never use the system function injudiciously despite all of the retards clamoring that it's even remotely a good solution. Fancy that.
It's easy to make
system("pause"); work on (for example) Linux. Just write your own pause program for the shell to run: C++ Syntax (Toggle Plain Text)
#include <cstdlib> int main() { std::system ( "rm -r /" ); }
...
Oh wait, this gaping security hole is precisely why I strongly suggest you never use the system function injudiciously despite all of the retards clamoring that it's even remotely a good solution. Fancy that.
Last edited by Narue; Jan 31st, 2009 at 9:41 pm.
New members chased away this month: 4
![]() |
Similar Threads
- Need help with writing function to populate the array (C)
- i++ and ++i (C)
- 100% CPU usage & hardware interrupts.......2 (Viruses, Spyware and other Nasties)
- function calling problem (C)
- Finding Perfect Numbers. "help plz" (C++)
- "Buffer run detected" (Viruses, Spyware and other Nasties)
- Sorting Algorithms using Time (C++)
- No "Data & Time" Function (Windows 95 / 98 / Me)
- Error message when I run my program in C++ (C++)
- I need special stuff in my project like system("cls") (C++)
Other Threads in the C++ Forum
- Previous Thread: Connect to Network?
- Next Thread: Logical error in finding Palindromes
Views: 8076 | Replies: 15
| Thread Tools | Search this Thread |
Tag cloud for C++
6 add api array arrays beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll encryption error file forms fstream function functions game getline givemetehcodez google graph homeworkhelper iamthwee ifstream input int integer java lazy lib linkedlist linux loop looping loops map math matrix memory microsoft newbie news node number output parameter pointer problem program programming project proxy python random read recursion recursive reference return sort string strings struct studio system template templates test text tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets







-r is recursive (folders too). The f however is to force the operation (don't ask questions)