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

Salem commented: Thread grave digger -3

Recommended Answers

All 5 Replies

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.

commented: Yup yup. +5
commented: good point :) +25

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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.