-
File placement
I have made a project for an ADT GasStation. But I want to expand on it and make a whole community. I want to add it to a larger project, Community, so that a Community can have GasStations. How do I place the files of the projects so that they can interact? Would I just copy/paste the whole GasStation project into the Community project folder? And put folders in Community's source and header files for GasStation header and source files? Or some other way?
-
What, exactly, are you talking about?
Assuming that you're talking about source and header files (can't tell because your question is so disorganized and clearly not well thought out), then it doesn't matter where you put your files so long as you include the correct header files with appropriate file path references.
-
I think what you are talkin is that create a header file and put a logical unit in that and from the other units just include the header file than you can easily communicate with each others translation units...
And if you wanna go further you can create shared object or static library and you can just include those library from where your main is starting
-
What I'm talking about...is basically combining two projects. I have an existing project, GasStation, that I'd like to add to a separate project Community so that a Community object may have GasStation's. My question is how I arrange the .h files and #include to accomplish this. I tried adding the whole GasStation project in the header file folder and adding a .h named GasStation.h. Then in GasStation.h I tried to #include some of the files from the GasStation project. For example,
Code:
#include "GasStation/Building.h"
Code:
#include "Building.h"
and other mix-ups like that. But the compiler always tells me that it cannot find the file. I am using Visual C++ as an IDE if that helps.