Thread: Setting up a project

  1. #1
    Registered User
    Join Date
    Mar 2007
    Posts
    92

    Setting up a project

    I have four files in a project. Two header files and two .CPP files. Main.cpp, Main.h, Object.h, Object.cpp.

    In Main.cpp I have the code, #include "Main.h".
    In Main.h I have the code, #include "Object.h".
    And in Obect.cpp I have the code, #include "Object.h".

    To my understanding this should link them all and it should work correctly. The problem I'm seeing is that in Object.cpp all the variables that I declared are coming up undeclared even know the syntax and variable names are correct. I can post my code but it would take up more than 1100 lines. I'll post it if you can't help me with just the information I provided. Thanks.

  2. #2
    Registered User
    Join Date
    Mar 2007
    Posts
    92
    I'm going to post my project.

    Note: If you're in my class (you know who you are) don't think about using any of this code. First off you'll have trouble getting it to work lol and second the teacher already has a copy of it and will know if you used this.

    The first two files are the driver programs written by the instructor. It will use the code I wrote. The second two files are for the code that I wrote. Thanks so much if you help!
    Last edited by warfang; 04-21-2007 at 04:26 PM.

  3. #3
    Registered User
    Join Date
    Mar 2007
    Posts
    92
    xxxx
    Last edited by warfang; 04-22-2007 at 12:31 PM.

  4. #4
    Registered User
    Join Date
    Mar 2007
    Posts
    92
    xxxx
    Last edited by warfang; 04-22-2007 at 12:31 PM.

  5. #5
    Registered User
    Join Date
    Jan 2005
    Posts
    7,366
    All that code posted and no error messages.

    My guess is that you need to add String:: to all your String member function definitions.

  6. #6
    Registered User
    Join Date
    Mar 2007
    Posts
    92
    wow I feel like an idiot. Thanks.

  7. #7
    Registered User
    Join Date
    Aug 2006
    Posts
    9
    yaar tu mast banda hai...poora project de daala...chummi dene ka man kar raha hai...
    thnx yaar...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem Displaying a Struct
    By rockstarpirate in forum C++ Programming
    Replies: 16
    Last Post: 05-05-2008, 09:05 AM
  2. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  3. Setting up a MSVC.NET 2002 project for Release mode
    By DavidP in forum Windows Programming
    Replies: 2
    Last Post: 05-24-2004, 07:00 AM
  4. VS .net project setting question
    By Jumper in forum C++ Programming
    Replies: 1
    Last Post: 05-13-2004, 11:03 AM