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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
iostreamheader is<iostream>, not<iostream.h>. The error you’re getting suggests that the compiler is looking foriostream.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.hunless they come from C as well (in which case you should probably use the C++ versions of the headers anyway).Hope this helps!