+ 2

Problem with conio.h

whenever i am using clrscr() function it says ERROR not declared in scope, while other function like getch() and kbhit() of that header file are working fine. I have also included <conio. h> header file. Is there a possible way to fix that?

4th Dec 2016, 1:51 PM
Rishabh Agrawal
Rishabh Agrawal - avatar
3 Antworten
+ 1
try using #include <stdlib.h> system("cls"); //clear screen or try using differrent compiler. by the way i'm using Visual Studio 2010.
4th Dec 2016, 2:00 PM
Indrico Jowensen
Indrico Jowensen - avatar
+ 1
Well I know that's a second option but just wanted to know why I can't use clrscr() function in the code playground. It worked fine for me in Turbo c++. @Indrico And thanks for the answer.
4th Dec 2016, 2:11 PM
Rishabh Agrawal
Rishabh Agrawal - avatar
+ 1
conio is not available on Unix/Linux platforms. It is specific to borland compiler on Windows. If you really want to use the same functions, go for curses.h. However I will highly recommend you to not go for it.
4th Dec 2016, 2:29 PM
ashish mankar
ashish mankar - avatar