cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Why "not" use system("")
Why "not" use system("")
May 9, 2010 at 8:16am UTC
Morph
(41)
I was searching for font colors in console app. and some guy was suggesting using system("Color XX"). But all the users was complaining about people who uses system("") . Why are they complaining ?
May 9, 2010 at 8:23am UTC
Seraphimsan
(954)
system opens up a massive can of worms on your programs security.
What would happen if say you call "pause" through system, and somebody replaced that program with a virus?
May 9, 2010 at 9:16am UTC
Null
(957)
http://www.cplusplus.com/forum/articles/11153/
May 9, 2010 at 11:50am UTC
Duthomhas
(13206)
Besides which,
system(
"color XX"
)
changes all the colors on the screen -- which is usually not what is wanted. Better to just use the
SetConsoleTextAttribute
() function directly:
http://www.google.com/search?btnI=1&q=msdn+SetConsoleTextAttribute
If you want to do it on Unix, let me know.
Topic archived. No new replies allowed.