>An alternative is for you to simply add alias cls='clear' to your .bashrc file (assuming you use bash).
Ofcourse I know that on Linux the command is clear. I was telling him what does portability actually means. I was encouraging him to write codes that work on multiple platform rather than stick to one.
A general working rule is : Don't use shell command until it is important.
Another thing to add is system() is very well portable, but the command it takes are not.
Read a perfect article on why system() is bad :http://www.webinmind.net/bpc.html#six
It is non-portable, It is unsecured, It is slow.
siddhant3s 1,429 Practically a Posting Shark
siddhant3s 1,429 Practically a Posting Shark
siddhant3s 1,429 Practically a Posting Shark
siddhant3s 1,429 Practically a Posting Shark
ddanbe commented: Very good answer to the question at hand. +4
Salem commented: I agree +29
siddhant3s 1,429 Practically a Posting Shark
00Vic commented: I found his posts helpful for learning new concepts +1
siddhant3s 1,429 Practically a Posting Shark
siddhant3s 1,429 Practically a Posting Shark
siddhant3s 1,429 Practically a Posting Shark
siddhant3s 1,429 Practically a Posting Shark
siddhant3s 1,429 Practically a Posting Shark
siddhant3s 1,429 Practically a Posting Shark
siddhant3s 1,429 Practically a Posting Shark
siddhant3s 1,429 Practically a Posting Shark
siddhant3s 1,429 Practically a Posting Shark
siddhant3s 1,429 Practically a Posting Shark
siddhant3s 1,429 Practically a Posting Shark
siddhant3s 1,429 Practically a Posting Shark
siddhant3s 1,429 Practically a Posting Shark
siddhant3s 1,429 Practically a Posting Shark
siddhant3s 1,429 Practically a Posting Shark