cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
TERM environment variable not set
TERM environment variable not set
Aug 5, 2012 at 9:25am UTC
ThomasMylonas
(22)
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");]
Aug 5, 2012 at 12:40pm UTC
TheIdeasMan
(6817)
There is an article on this site all about that topic.
system(
"clear"
);
is not portable.
Aug 5, 2012 at 2:02pm UTC
ThomasMylonas
(22)
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 !!
Aug 5, 2012 at 3:21pm UTC
Zephilinox
(595)
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.
Aug 5, 2012 at 7:49pm UTC
ThomasMylonas
(22)
Thanks friends for your advices !!
Topic archived. No new replies allowed.