Can't use SYSTEM('CLS');

Feb 7, 2010 at 8:10pm
Dear guys,

SYSTEM('CLS');

I can't use the clear screen function in my code. I have tried everything what i could, but it doesn't work at all.

I included cstdlib or stdlib, but nothing..

I know it's not a good way to clear the screen, but i think it's the most simple way for a beginner. If you know a better way, i also interested in it, but i want to know this way, too. Secondly, i want to finish a lil' program tonight with it, so..

Thank You, and sorry for my weak english :)
Last edited on Feb 7, 2010 at 8:10pm
Feb 7, 2010 at 8:22pm
It's like i can write some empty line to pretend it's clear but it's a really idiot way and not too nice.
Feb 7, 2010 at 8:27pm
most simple != least typing.

http://www.cplusplus.com/forum/articles/10515/

Here is a very strong hint: don't do that. There really isn't any good reason for your programs to clear the screen when you are just learning how to program.
Feb 7, 2010 at 8:29pm
closed account (S6k9GNh0)
Functions are capital specific. You need to use all lower case in this situation. Also, in C, you need to include stdlib.h and in C++, you need to include cstdio. This is because C requires a .h at the end of std headers while C++ requires no file extension at the end of std and stl headers.

But, I would like to say that you shouldn't use system() ever, at any time.
Last edited on Feb 7, 2010 at 8:30pm
Feb 7, 2010 at 8:46pm
Duoas: Talking about reasons? Clear the screen is very likely the most simple thing in programming. After some time it can be disturbing when the screen is with full of shit. :)

I have already known why system() can be dangerous, i just want to know more and more stuff about C++, and not just reading about it -- sometimes use it for practicing.

Beginner != writing programs which contains 10 lines.

computerquip: Doesn't work with #include <cstdio>

error C3861: 'SYSTEM': identifier not found
Last edited on Feb 7, 2010 at 8:49pm
Feb 7, 2010 at 9:04pm
closed account (S6k9GNh0)
Because SYSTEM does not exist. It cannot be capitalized. It's system(). Not SYSTEM(). Clearing the screen is generally not the most simple thing in programming. Although there are simple workarounds.
Feb 7, 2010 at 9:09pm
Talking about reasons? Clear the screen is very likely the most simple thing in programming.
C and C++ are mainly back-end languages. Clearing the screen is a front-end action.
That doesn't mean that there are no contexts where a C/++ program should be clearing the screen, just that a beginner shouldn't be concerned with such minutia.

it can be disturbing when the screen is with full of shit.
It sure can.
Feb 7, 2010 at 10:55pm
Clear the screen is very likely the most simple thing in programming.
I suppose your vast knowledge of programming and user interface design issues qualifies you to make such a statement.

it can be disturbing when...
Then keep your display out of the bathroom.
Feb 8, 2010 at 2:58pm
it can be disturbing when the screen is with full of shit.
It sure can.


Ooh, very subtle Helios. I like it!

@OP: Keep in mind that the 'shit' that you're seeing is the output of your own code. It should be helping you as a beginner. Not distract or confuse you.
Topic archived. No new replies allowed.