Guessing the header file

In C++ name the header file which enables

clrscr()

and

getch()

functions.

Note:I don't have many followers so please share it so that everyone gets to see it. :) Regards

include<iostream.h>

include<conio.h>

include<stdio.h>

include<ctype.h>

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

6 solutions

Sorry, Conio.h is not a part of the standard C++ library

Jackie Steck
Mar 20, 2014

Yeah, that was pretty obscure... if you want to use it with standard C++, you can do something like this:

// somewhere in the program
// WINDOWS is defined 

void console_clear_screen() {
     #ifdef WINDOWS
     system("cls");
     #endif
     #ifdef LINUX
     system("clear");
     #endif
}
Gernel Lumacad
Mar 28, 2014

clrscr(); and getch(); requires the header file conio.h i.e #include <conio.h>

Hello please tell me the scope of programming in industries

Harkirat Singh - 7 years, 2 months ago
Daniel Lim
Mar 31, 2014

This is for Turbo C++. Other compilers may not compile this

use "_getch()" (underscore+getch) in visual studio.And clrscr is not available in visual studio.i think because screen is automatically cleared everytime you run your code on visual studio.

Aashirvad Raj - 4 years, 7 months ago
Luqman Mateen
Mar 31, 2014

clrscr(); and getch(); requires the header file #include <conio.h>

Aman Jaiswal
Mar 20, 2014

I am sorry if the question wasn't clear.

getch() : used to hold the output screen so that the user can see the output and clrscr() : removes random unwanted text from screen.

I believe there are several alternatives to them that can be used while programming but in the question only their header file was asked.The answer is (#include (conio.h))

(#include (iostream.h)): enables input and output.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...