As in C++ header files are used without .h extension like <iostream>
instead of <iostream.h>
but its not same in case of <conio.h>
. Why we can't use <conio>

- 5,753
- 72
- 57
- 129

- 11
- 1
- 1
- 6
4 Answers
The C++ standard specifies which headers are part of the C++ standard library. In addition to C++-specific headers, it includes the headers specified by the C standard. You can use them with their C names (e.g., #include <stdio.h>
), and they put their symbols into the global namespace. You can use them without the .h
extension and a c
on the front (e.g., #include <cstdio>
), and they put their symbols into the namespace std
.
But that's only for the headers from the C standard. conio.h
is not part of the C standard, so the C++ standard doesn't say anything about it.

- 74,985
- 8
- 76
- 165
conio.h is a C header, thus (traditionally) C headers had the .h extension for the system headers. C++ standard headers are mainly without this .h extension. As you may know, many C headers (those from the standard library) have C++ counterparts (like in C++ is )

- 949
- 4
- 10
conio isn't part of the c++ standard, so you can't count on the compiler to know what it is. :(
In fact, i think it's usually only supported under windows.

- 5,552
- 1
- 18
- 18