Is there any method to find what is the error while Executing System() function?

Comments
Thread grave digger

Be that as it may, sometimes I find it necessary to call system(). Especially when you need to clear the screen.

Application that use system() to clear the screen are a downright pain in the ass, excuse my language.

As a user of the application, I might have some 'important' information on the console before running the application, if the application 'clears' the screen with system() all of this is gone.

Comments
good point :)
Yup yup.

Application that use system() to clear the screen are a downright pain in the ass, excuse my language.

As a user of the application, I might have some 'important' information on the console before running the application, if the application 'clears' the screen with system() all of this is gone.

Err, and why would you be using system() if you didn't need it?
I said its useful when you need the screen to be cleared. For example, a two player game of hangman, IE:

Player 1 enters the word to be guessed by Player 2,
System("cls"),
Player 2 guesses the word .

;-)

But yeah, i know its a big pain for the processer.

Edited 6 Years Ago by pspwxp fan: n/a

A lot of people use it, for example to 'pause' the application, or they clear the screen on startup which most of the time gives the problem I stated in my last post.

So all I say is that mostly the use of system() is wrong, except in special cases.

This article has been dead for over six months. Start a new discussion instead.