Creating a Dev-C++ Project File

This is a discussion on Creating a Dev-C++ Project File within the C++ Programming forums, part of the General Programming Boards category; I broke up my program into an implementation file, a header file and a client source code file. I am ...

  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    34

    Exclamation Creating a Dev-C++ Project File

    I broke up my program into an implementation file, a header file and a client source code file. I am using Dev-C++ and am having trouble getting the project file to link everthing and build the project.

    So I have, say a, class.h which contains the class definition, class.cpp which contains the implementation, and client.cpp which is the driver program.

    Which header files should I include in each of the three separate files. Also, should I be including things like <string> and <iostream> in class.h, class.cpp and client.cpp? And should I also include the 'using namespace std' in all three?

    Thanks.

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    835
    You should include whichever standard header files you need in any of the .h or .cpp files, but never use a using directive in a header file, since it takes effect automatically in any file unfortunate enough to include it. Same goes for using declarations.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Creating File Handling Functions
    By td4nos in forum C Programming
    Replies: 6
    Last Post: 06-26-2009, 12:43 PM
  2. Newbie homework help
    By fossage in forum C Programming
    Replies: 3
    Last Post: 04-30-2009, 05:27 PM
  3. File transfer- the file sometimes not full transferred
    By shu_fei86 in forum C# Programming
    Replies: 13
    Last Post: 03-13-2009, 01:44 PM
  4. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 09:35 AM
  5. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 10:38 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21