![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Nov 2007
Location: Central USA
Posts: 17
Rep Power: 0
![]() |
clear the screen in linux
i am having a problem with clearing my screen on Linux...
i have been creating a small dumb program that does nothing but i am just trying to get practice programming and i have been using windows XP and i was using system("cls") to clear the screen and now that i am back home and on my own computer i am programming on Linux and i couldnt get the program to compile because it came up with errors where ever i put the system("cls") and i also used the system("clear") but it also brought up errors these are the errors: login.cpp:22:10: warning: character constant too long for its type login.cpp: In function ‘int main()’: login.cpp:22: error: invalid conversion from ‘int’ to ‘const char*’ login.cpp:22: error: initializing argument 1 of ‘int system(const char*)’ am i using the wrong functions or am i missing something?? thanks for any help on this |
|
|
|
|
|
#2 | |
|
Newbie
Join Date: Apr 2008
Posts: 10
Rep Power: 0
![]() |
Re: Some Beginner Questions
Quote:
|
|
|
|
|
|
|
#3 |
|
Expert Bug Developer
Join Date: Apr 2008
Posts: 21
Rep Power: 0
![]() |
Re: clear the screen in linux
Naturally, you'll have to post your code if you want any kind of help with your it. Our psychological powers have been lacking lately.
![]() By the way, I'd like to throw in that I highly recommend against clearing the screen. Here are some reasons why: http://www.daniweb.com/forums/post66701-7.html |
|
|
|
|
|
#4 |
|
Not a user?
Join Date: Sep 2007
Posts: 255
Rep Power: 1
![]() |
Re: clear the screen in linux
I thought programmers were anti-social by default...
|
|
|
|
|
|
#5 |
|
Newbie
Join Date: Nov 2007
Location: Central USA
Posts: 17
Rep Power: 0
![]() |
Re: clear the screen in linux
can anyone tell me the command for clearing the screen in linux?
i tried system("cls") system("ckear") neither one of those works |
|
|
|
|
|
#6 |
|
Newbie
Join Date: Apr 2008
Posts: 10
Rep Power: 0
![]() |
Re: clear the screen in linux
Why don't you post the goddamn code? And the latter should work, assuming you meant "clear".
|
|
|
|
|
|
#7 | |
|
PFO God In Training
![]() Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 530
Rep Power: 4
![]() |
Re: clear the screen in linux
Quote:
Another way is to use curses library for screen output. Third way is to use vt100 api calls. Fourth way is to use termcap function calls. Fifth way is to print a bunch of '\n' characters.
__________________
I Like Ike. Vote for Dwight Eisenhower this November. --This message brought to you by the the Procrastinators Club Of America. |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do I clear the screen? | crawforddavid2006 | Java | 24 | Apr 1st, 2008 3:44 AM |
| Clear screen with Java | Eric the Red | Java | 9 | Feb 22nd, 2006 10:28 PM |
| How to clear the screen ?? | Gunman | Python | 7 | Oct 24th, 2005 9:51 PM |
| Clear screen | chungchung | C | 10 | Oct 13th, 2005 8:07 PM |
| Clear Screen in Java | Dark Flare Knight | Java | 3 | Jun 24th, 2005 12:09 PM |