Suppose my project directory has 2 sub-directories A and B, A directory contains: A.h and A.cpp, B directory contains: B.h and B.cpp and my root directory contains main.cpp
Now the contents:
A.h:
#include"../B/B.h"
a();
A.cpp:
#include"A.h"
a()
{
b();
}
B.h:
b();
B.cpp:
b()
{
cout<<"Blah Blah Blah";
}
main.cpp:
#include"A/A.h"
main()
{
a();
}
and compile the code using:
c++ main.cpp A.cpp B.cpp
Question is simple: In the first file (A.h), I would not like to write the first line as
#include"../B/B.h"
How may I change it to #include"B/B.h" or #include"B.h"?