C++ header issues: why wont it recognize my header?
#include "wordcounter.h" wordcounter.h is a header I have to use in my c++ program, however, it continuously says that it cannot be found, even though it has been added to the the project. Error message: "(4): fatal error C1083: Cannot open include file: 'wordcounter.h': No such file or directory"
Is it in the same directory as the C/C++ file that is trying to include it?
yes, I do believe so
What compiler/IDE are you using? Make sure your header search paths are set up properly. Generally though, if you use the #include "header.h" form (rather than #include <header.h>), it should find it if the header is in the same directory as the including .c/.cpp. Make sure this is the case first, and if it's not in the same directory, you'll need to set up a header search path for your compiler.
Visual C++ Express 2010. It is in the same directory, but how would I set up a search path?
Join our real-time social learning platform and learn together with your friends!