question about .h ,about the compiler

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

using namespace std;

int main()
{

SetConsoleTitle("Hello");
cout<<"Hello";
getch();
return 0;
}


i have understood this program very well...
What i dont understand is when i type
#include <windows>

i get an error message.....
why is .h necessary for windows header file and for conio file........but not for iostream................
well <iostream.h> is the deprecated version of <iostream> so I assume that <windows.h> is just the original header that was created and has not beeng upgraded since.
the .h was removed from standard headers file names for compatibility, some compilers have both versions.

conio.h and windows.h are C headers. windows API has evolved in MFC but it isn't available for free
You would be a lot cleaner by stating this: #include "windows.h" instead of <windows.h>

This will produce no errors.
Even if windows.h is not part of the C++ standards, the angle brackets should be OK as it is really likely that windows.h directory is included in the compiler's header directories
Topic archived. No new replies allowed.