Don't try to include the headers blackpage mentioned, they're all wrong. For std::cerr, std::endl etc you include <iostream> (no .h). But it seems to me that you are not just missing some includes, you seem to be missing to link c+++ as c++ code. If you want further help, post a complete, compilable, but smallest possible example that exhibits your problem.