C++ newbie problem
I believe you have to include dos.h. If it is not that then it is something else because I have used clrscr.
----------------------------------------------------"Plant a tree. Remove a Bush" -A bumper sticker I saw.
here is the code that would do what you want:
forgot, this is very platform dependant, so, for example that is the windows version, for linux, as another example, you would replace "cls" with "clear"
[edited by - pointer0death on June 30, 2002 7:14:17 PM]
#include <iostream>#include <stdlib.h>int main(int argc, char *argv[]){ system("CLS"); std::cout<<"Hello world!"; return 0;}
forgot, this is very platform dependant, so, for example that is the windows version, for linux, as another example, you would replace "cls" with "clear"
[edited by - pointer0death on June 30, 2002 7:14:17 PM]
clrscr() is a Borland function and not part of the standard. Doing system("CLS") should work, but it isn''t the most efficient thing, if that matters. You can pick up something like pdcurses.
June 30, 2002 06:26 PM
When in doubt go see google:
http://www.phanderson.com/C/clrscr.html
http://www.delorie.com/djgpp/doc/libc/libc_105.html
http://www.newbie.org/snippets/chats/bcb4/message/23.html
now take your own conclusions...
http://www.phanderson.com/C/clrscr.html
http://www.delorie.com/djgpp/doc/libc/libc_105.html
http://www.newbie.org/snippets/chats/bcb4/message/23.html
now take your own conclusions...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement