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..
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.
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.
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.
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.
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 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.