Thread: File placement

  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    117

    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?

  2. #2
    Registered User
    Join Date
    Apr 2004
    Location
    Ohio
    Posts
    147
    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.

  3. #3
    Registered User
    Join Date
    Oct 2009
    Location
    While(1)
    Posts
    377
    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

  4. #4
    Registered User
    Join Date
    Oct 2009
    Posts
    117
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 09:35 AM
  2. Encryption program
    By zeiffelz in forum C Programming
    Replies: 1
    Last Post: 06-15-2005, 03:39 AM
  3. Making a LIB file from a DEF file for a DLL
    By JMPACS in forum C++ Programming
    Replies: 0
    Last Post: 08-02-2003, 08:19 PM
  4. Hmm....help me take a look at this: File Encryptor
    By heljy in forum C Programming
    Replies: 3
    Last Post: 03-23-2002, 10:57 AM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 02:58 AM