Mail Archives: djgpp/1997/02/09/22:38:12
On Sat, 08 Feb 1997 09:31:47 -0500, SoMeOnE <bradh AT praxis DOT net> wrote:
>Thanks for reading this message....my problem is when I try to make and
>include file ( .h ) and include it in multiple C++ files...it comes up
>with an error on all int's and char's that they have already been
>defined....I have always had this error with other compilers and I know
>it's me that's doing something wrong, not the compiler. If someone could
>reply to this and tell me what I am doing wrong, I would greatly
>appreciate it....
You can avoid this by not declaring variables in header files that will be
included in more than one source file. You can define structures, #define
constants, and a number of other things in headers, but don't declare new
variables.
It's easier for me to do than to explain, so forgive me if my vernacular is a
little off.
- Raw text -