Problem with including files
I have the following setup:
Folder C contains...
1. Folder A
- A.cpp
2. Folder B
- Folder B1
- B.h
In A.cpp, I need to include B.h but I always get a No Such File or Directory error. I have tried
which I think is supposed to be correct but it still generates an error.
Try
and make sure the project's root folder (C) is set up as an include folder. With gcc/g++:
Alternatively, you can use this path in your A.cpp, but I think it's not the best solution:
In any case, you should use "", and not <>.
Last edited on
Topic archived. No new replies allowed.