TERM environment variable not set

Hello everyone !!
I wrote a C++ console program, in the compilers in Linux (g++, qt creator).

I used the function

#include <cstdlib>
// bla... bla .....
system("clear");

I wanted to clear the console.... and it answered me with this error ...

"TERM environment variable not set."

Someone help me ? Thanks in advance !!

[I didn't tried it in windows devcpp with : system("cls");]
There is an article on this site all about that topic.

system("clear"); is not portable.
Thanks for replying my friend!
Can you give a link for this article you said ?
What can I use in this particular case ?
Thanks in advance !!
http://www.cplusplus.com/articles/j3wTURfi/

as for alternatives, they are all hackish, you could print a bunch of new lines, use macros to change the compilation for different OS's or use an external library which handles it for you i na cross platform way.
Thanks friends for your advices !!
Topic archived. No new replies allowed.