Hello
I have a C++ project A which has to use heather/source files of project B.
When I do include "B.h" then B's heather can't be seen because B and A are in a different sub-folders of the same folder.What can I do
thank you
booker 0
Newbie Poster
Recommended Answers
Jump to Post#include "..//Folder_Name//File.h"
or
#include "../Folder_Name/File.h"
I think this should work out.
You need to traverse to the previous directory and then to a sub-directory.
Jump to PostProbably the simplest way to go:
#include "../projectBfolder/B.h"
or add the project B folder to include paths list of the project A. How to do it depends on your IDE, of course...
All 6 Replies
Sky Diploma 571
Practically a Posting Shark
ArkM 1,090
Postaholic
mvmalderen 2,072
Postaholic
Sky Diploma 571
Practically a Posting Shark
booker 0
Newbie Poster
booker 0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.