C clear screen

Pages: 12
Oh and to answer MottMan, did you happen to read the thread... do you read?
closed account (S6k9GNh0)
sargon94, no. You might as well not. It is not only a major security issue, it is not portable and its not very light either. Do not suggest it to other people, it is terrible practice. I don't even use it for practice programs. We even provide you an alternative solution.
Last edited on
I'd say if you're making a console program you might as well leave the output on screen.
http://www.cplusplus.com/forum/articles/10515/
^This will solve all your problems. Except maybe substance addiction if applicable.... >.>

-Albatross
sargon94 wrote:
Oh and to answer MottMan, did you happen to read the thread... do you read?


What's with the hostility? I was replying to a claim you made saying that there was no way in windows to clear the screen without system or std::endl. The OP was answered but the discussion continued because of your suggestion to use system("cls").
Erm... sargon94.... I can't help but notice that your posts are in general are to some degree aggressive. Why do you attack members of this forum?

-Albatross
I don't, unless they attack ideas that I find to be acceptable. For instance, using system ("cls") for a simple console program.
Last edited on
Well...a large part (possibly the entire) forum dislikes system("anything"). I was giving a simple alternative that I use, and for some reason you questioned my ability to read. But regardless, this thread is done unless Albatross has more to add...
Last edited on
I questioned your abilty to read because that answer was already stated above AND it has more problems than system ("cls"); maybe it was uncalled for, maybe it wasn't. I just felt that I should justify my comment.
It's worth noting that clearing the screen isn't as easy as it could be probably because clearing the screen is something console programs typically shouldn't do, and thus there was little/no reason to standardize such a feature.
Last edited on
Also, just because a "large part" thinks something doesn't mean they're right.
The console is a system dependant device, meaning it is manipulated differently for every system + hardware configuration you have got. One of the things that made the PC so popular was that hardware was required to conform to specific operational standards -- and hence avoid a lot of the grief that came with manipulating the standard devices. Despite that, though, the devices remain one of many, and doing something like clearing the screen or flushing input remains a system dependant operation.

One of the foundations of the Unix design was the concept of "streams". Something we take for granted, like having the standard I/O streams automatically connected to a character device -- possibly redirected -- when the program starts, was a revolutionary concept. It provided, beyond an end to complicated job control scripts to start a program, a great deal of flexibility and power in the design of programs -- stuff we take for granted today with programs like cat, sed and grep.

Of course, sometimes the program's design wants a human to be present to be useful, like a text editor or a video game. Since different devices and systems remain, happily, different, extra expertise is required to do fancy things with them -- like clearing the screen. The termcap and later terminfo databases were designed for the very purpose of standardizing access to the myriad of TTY devices available so that the programmer can write device-independant code to manipulate them. Using it is actually rather convenient and introspectable.

sargon94 wrote:
Also, just because a "large part" thinks something doesn't mean they're right.
And just because you believe your brain to be bigger and faster than computer professionals and industry leaders many times older and more experienced than you does not make you right.

Your responses in this thread mark you as a CS loser:
  - you suggest the use of a dangerous function
  - you fail to read direct links given to you which thoroughly prove the danger of said function
  - you ridicule those who remonstrated with your failure to read and understand
  - you call us "Nazis" (somehow you missed http://en.wikipedia.org/wiki/Godwin%27s_law )
  - you libel another's comprehension by crudly suggesting he can't read
  - you belittle others because their views conflict with your (uninformed) view

You won't get far so long as you stick with your script kiddie wannabe crap. How about taking a little time to actually learn something useful and make yourself a friend to others, rather than lead them to do stupid things and huff and puff when you make a mistake?

Don't be a loser.
*whistles, I'm not sure i've ever been told i'm wrong in such a eloquent and logical fashion.
Duoas wrote:
And just because you believe your brain to be bigger and faster than computer professionals and industry leaders many times older and more experienced than you does not make you right.

I never said or thought that.
sargon94 wrote:
Also, just because a "large part" thinks something doesn't mean they're right.

what was ment by that statement was that everyone follows the leader. lemmings follow each other off a cliff because their leader goes, not because it is right. and yes I know it's a myth.
that was your only mistake, aside from that you're right and I do act like a dumb*ss. Maybe i'll stop
Dude I'd not even use system, just because it's slow (and yes you actually do notice the difference, especially if someone like you comes along, posts a code of a lot of lines with 59 times a system command where i'm not bothered to change all of it....)
let alone all the other evilness
Last edited on
ok, ok, I get it... let's move on.
Topic archived. No new replies allowed.
Pages: 12