why .h with conio

#include <iostream>
#include <conio.h>

using namespace std;

int main()
{
int andy=23;
cout<<andy;
getch();
}


Why do i have to write conio.h.Why can't i write 'conio' like i write iostream.
It is because conio doesn't exist. Here is a link I found that gives some background on why there are two versions of iostream headers. You could probably find a lot of articles on the subject using a search engine. I searched on "iostream vs. iostream.h".

http://members.gamedev.net/sicrane/articles/iostream.html

By the way, conio is not part of the std library. If you can avoid using it that would be better. I have never had to use it myself. You are better off using the standardized libraries.
Last edited on
Topic archived. No new replies allowed.