Thread: .cpp and .h

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #12
    Registered User Drogin's Avatar
    Join Date
    Oct 2005
    Location
    Norway
    Posts
    105
    A good name to use for the header guard is HEADER_H, where that's the name of the file. For example, for "core.h", you might use CORE_H.
    I'm not that experienced with C++... but is it to prevent your names from accidently messing with reserved words or other other defined constants, while using consistent names for the defines?
    Last edited by Drogin; 07-02-2008 at 03:49 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Get .cpp and .h files to communicate...
    By yaya in forum C++ Programming
    Replies: 6
    Last Post: 11-25-2008, 12:45 AM
  2. .cpp and .h files - organization
    By ChadJohnson in forum C++ Programming
    Replies: 4
    Last Post: 01-12-2006, 11:40 PM
  3. Why Declare in .H but Define in .CPP ?
    By Krak in forum C++ Programming
    Replies: 10
    Last Post: 07-30-2005, 12:36 AM
  4. placement of (.h) and (.cpp) files..!?
    By matheo917 in forum C++ Programming
    Replies: 3
    Last Post: 02-22-2003, 06:37 PM
  5. Class files (.h and .cpp
    By Todd in forum C++ Programming
    Replies: 7
    Last Post: 02-14-2002, 03:07 PM