Paul Herring wrote: > On Sun, Mar 15, 2009 at 2:26 PM, ruhatadiyaman > <[email protected]> wrote: >> i want to clean screen in somewhere of my codes but 'clrscr()' does not work >> with >> #include<conio.h> . as i search it does not work in DEVC++(bloodshed). and i >> saw >> the system("cls") function which is declared in stdlib and it is working. >> is this a true way to clean screen? > > It's not portable if that's what you're asking. There is no portable > way of clearing the screen. > > http://c-faq.com/osdep/termcap.html
Clearing the terminal screen in a portable fashion is best done with a portable third-party library (e.g. ncurses is probably the best cross-platform library in terms of ease-of-use). If you don't mind being tied to a single platform, you can roll your own using that platform's system/API calls (e.g. the Console API for Windows). -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* MyTaskFocus 1.1 Get on task. Stay on task. http://www.CubicleSoft.com/MyTaskFocus/
