Subj : Re: Problem with compiling this code To : borland.public.cpp.borlandcpp From : maeder Date : Sat Sep 10 2005 08:24 pm "Scott Wilson" writes: > I am having an issue with the compilation of this code (well this is > the class header where the error is flagging that the problem is): > > The Errors: > Error E2238 FullScreenTitleBar.h 53: Multiple decleration for CTitleBar2 > Error E2344 FullScreenTitleBar.h 52: Earlier declaration of CTitleBar2 [in addition to Ed Mulroy's post:] It seems that the definition of class CTitleBar2 is parsed twice for the same translation unit. This is an error. "#include guards" are typically used to solve this problem; At the top of the file containing the definition of class CTitleBar2, add the following two lines #if !defined(CTITLEBAR2_H) #define CTITLEBAR2_H , and at the end of this file, add the following line: #endif [The symbol defined in the #include guard may vary, but it's a good idea to make it long and ugly, as all user-defined macro names.] This will cause the compiler to skip the entire contents of that file when it is #included for the second time for a translation unit. .