xuandl
xuandl

Reputation: 193

Why do I get an including <iostream.h>?

I have been trying to import iostream into a custom block, I added the line

 #include <iostream.h>

in the .h file and in the .cc file but I get the error:

fatal error: iostream.h: No such file or directory

Upvotes: 0

Views: 555

Answers (1)

templatetypedef
templatetypedef

Reputation: 373462

The iostream header is <iostream>, not <iostream.h>. The error you're getting suggests that the compiler is looking for iostream.h, which suggests that you might be including the wrong header.

Try changing the header to <iostream> and see if that fixes the problem. More generally, make sure you aren't including any C++ standard library header files suffixed with .h unless they come from C as well (in which case you should probably use the C++ versions of the headers anyway).

Hope this helps!

Upvotes: 2

Related Questions