Since I use Linux, would you consider it bad programming practise to use STDIO.H's system() function to clear the screen like this:
Code:system("clear");
Since I use Linux, would you consider it bad programming practise to use STDIO.H's system() function to clear the screen like this:
Code:system("clear");
I have arms?
>would you consider it bad programming practise to use STDIO.H's system() function to clear the screen
Yes. Since you're using Linux, and command line programs are typically written to be as considerate as possible toward other programs on Linux, you shouldn't be clearing the screen unless you own it (through curses or the X-Windows API). Rest assured that when your program throws away important output from previously called programs, the user will hate you.
My best code is written with the delete key.
... not to mention the confusing of which "clear" you're actually running. If you're going to system out a command, make sure you at least provide the full path:
system("/usr/bin/clear");
But, yeah, I agree with Prelude: you clear the screen and get rid of my previous output, and your program is dead meat!
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
Ok. Thanks. I was just porting an MS-DOS program to Linux, and I didn't know wether to keep the clrscr() function of conio.h in it to replicate it as much as possible. I guess I should just avoid clearing the screen then.
I have arms?