I know in dos to clear is : cls
But how can I do that in c++?
Printable View
I know in dos to clear is : cls
But how can I do that in c++?
:)Code:system("cls");
Btw, you need to include stdlib.h ;)
:rolleyes: Forgot that part. Thanks Wynd.
:)
Thx you Wynd and Blade.:)
Is there a faster way?
Z.
I guess using ASM to do it would be a little faster, but I don't know.Quote:
Originally posted by Zaei
Is there a faster way?
there may be a windows API function that clears the console window
i still think system("cls") would be faster
If you have a Borland compiler, conio.h has clrscr() or something like that.
yeah, but i would say it is best to stick to system("cls") it has just basically become the standard way of doing it. that way, people reading your code will know what you are talking about.
Does that fork a process?
system("cls");
Work perfectly, and I am using C++ of Microsoft:D
cool. i don't see a need to use things just to be different. thats why it's good to use system("cls")
I always prefer use the easy way :)