Possible Duplicate:
No such file iostream.h when including
Even after naming the source file with .cpp extension. my compiler gives this error, both in command prompt and Codeblocks. How can I fix this issue?
#include <iostream.h>
int main(){
cout<<"Hello World!\n";
return 0;
}
That header doesn’t exist in standard C++. It was part of some pre-1990s compilers, but it is certainly not part of C++.
Use
#include <iostream>instead. And all the library classes are in thestd::namespace, for examplestd::cout.Also, throw away any book or notes that mention the thing you said.