title: Why should the system() function be avoided in C and C++?
body: <p>I have seen a lot of people on forums telling to avoid the <code>system()</code> function, like <code>system("cls")</code>. I don't understand why.</p>
  
  <p>Please tell me why I should avoid this function. And also, as <code>clrscr()</code> doesn't work with CodeBlocks, what are other ways to clear screen without using the <code>system()</code> function?</p>