Question

Why the "Dev C++" couldn't support with iostream.h header file in C++..? How can I include iostream.h header file in Dev C++?

Was it helpful?

Solution

First of all, Dev C is not a compiler, it's an IDE that interfaces with a compiler (most presumably GCC/MingW in your case). The compiler suite is the one having the header files, not the IDE.

Just do

#include <iostream>

instead of

#include <iostream.h>

and also add using namespace std; to execute cout and cin in Dev C program.

OTHER TIPS

<iostream.h> is not a standard header file (if anything supports it, it's for backward compatibility from long ago). Use <iostream> instead. None of the header files introduced in C++ have an extension. The same advice goes for <fstream> over <fstream.h> as well.

try to include this way.

      #include<iostream> 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top