bug-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (Sem Assunto)


From: Tim Van Holder
Subject: Re: (Sem Assunto)
Date: Mon, 08 Jan 2001 15:59:20 GMT

address@hidden wrote:
> can't figure a way. Let me know if it's not a bug but only
> simple ingorance !!

It's simple ignorance.

'int treta;' isn't just a declaration, it's a definition.
So each file including the header will get its own 'treta' variable.

What you want to do is put

  extern in treta;

in the header, and

  int treta = 0;

in exactly 1 source file.

-- 
Tim Van Holder - Falcon Software N.V.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
This message was posted using plain text. I do not endorse any
products or services that may be hyperlinked to this message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]