clrscr() in visual c++

pemorej

Baseband Member
Messages
30
i want to use clrscr() in visual c++ but it wont work. the error is "undeclared variable". does this mean that ihave to declare the clrscr? it doesnt make sense.
 
Now, I don't know anything about C++! And I don't know how variables are introduced to C++; although I intend to learn. However, are Variables not displayed as 'Var'?

Either way, clrscr(), doesn't sound like a Variable - maybe you need a variable to control the clrscr()?
 
unfortunately clrscr() function is located in conio.h header file and conio.h was created by Borland. (In Dev C++ help .. u saw this). I don't know witch version of Visual c++ you have but try this :

#include <conio.h>
If this doesn't work try :
#include <conio.h>
#include <conio.c>

//Please note thet you must have this files in your Include folder (you can find Include folder in your VC++ instalation folder)
 
Simple

Well if u have included iostream and u are using namspace u can do it simple

sysyem("cls");

or by including stdlib and then doing same sysyem("cls");
 
Back
Top Bottom