![]() |
how to clear screen?
in C programming ; i printf something then i want to make the screen clear and printf another thing .It is for not making my program AMORPHOUS,how can i do that??
thanks. |
Re: how to clear screen?
clrscr is one of the easier option.
|
Re: how to clear screen?
Quote:
So, you can use system("CLS"); to clear screen, but that's OS specific.So it's better to write a user-defined func like : Code: C
Remember to #include <windows.h>. |
Re: how to clear screen?
Quote:
error C2601: 'ClearScreen' : local function definitions are illegal |
Re: how to clear screen?
Quote:
Error C260 indicates that you are trying to declare a function inside a function. So, did you directly paste the above code inside your main() ??? You should not do that. You should paste the above function globally and call it from main() or wherever wherever required, this way : ClearScreen(); |
| All times are GMT +5.5. The time now is 12:38. |