Say I have a two projects, "project1" and inside I have a main.cpp and headerOne.h file inside. For project two "projectTwo" I have inside another main.cpp and also a headerTwo.h file. If I am inside project two and I want to inherit a file/class (headerOne.h) from another project, what do I need to do? I have tried putting the name of the project and header file inside CMakeList.txt under add_executable, and I've tried using the PATH all to no avail. I've gone onto jetbrains and have not been able to find anything else to try. Is anyone familiar with CLion and connecting two project so that you can use inheritance? Thanks in advance.
// main.cpp project two
#include <iostream>
int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
}
// project two header file
#ifndef HEADERTWO_H
#define HEADERTWO_H
#include "HEADERONE.h"
// Inheriting HeaderOne file from project one
class book : public HeaderOne {
};
#endif /* HEADERTWO_H */