Reputation: 77
I'm doing my assignment that need to using the #include function but I found that after I define the header file, I cannot open the header file in the main.cpp and I also didn't find any xxx.h file in the project file
here is the situation
The reason of search.h can open is I found that in external dependencies file, there is a search.h, but the search.h I want to open is not the search.h in external dependencies file
Upvotes: 1
Views: 3342
Reputation: 57
It looks like you don't have any header files included in your project. Visual Studio is attempting to find the header files in the header directory of your project but it cannot find any. Save your header files into separate files and add them to your header directory in the project. Then you should not have any problem.
Upvotes: 1
Reputation: 1681
You don't have header files in your project. Create the header files xxx.h
in the project directory. So the compiler will be able to locate them.
If the person who gave you the project has provided you the header files along with the project requirements then, just copy and paste the xxx.h
files into the project directory. This would solve your problem.
To learn more about the header file. Click on the below tutorial link
Upvotes: 2