Mail Archives: djgpp/1997/12/07/19:55:59
I'm rather new to header files so I need some help.
I've written a small program that declars some classes and then tests their
functions. When I had it all in a single .cc file, the program compiled
and worked fine. Now I am trying to organize it and expand it, so I put
the class definitions in one file, foo.h,
and the member functions in another file, foo.cc. I then made sure that I
put #include "foo.h" in my main.cc, and #include "foo.h" in my foo.cc file.
Also in my foo.h file I put
#ifndef foo_h
#define foo_h
//includes and code
#endif
Now when I compile it, it says that my class functions are declared more
than once. What could be causing this problem? I have looked through
source code written for Borlands compiler and I am doing nothing diffrent
as far as the definitions go. I am using Rhide 1.4 as my editor under
Windows 95.
Please respond back to <dream_acres AT compuserve DOT com> as I do not subscribe
to the mailing list.
Thank you,
Joe Davidson
- Raw text -