[Top][All Lists]

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

Re: How to suppress the "multiple definitions of symbol"

From: Ulrich Eckhardt
Subject: Re: How to suppress the "multiple definitions of symbol"
Date: Tue, 05 Dec 2006 22:40:49 +0100
User-agent: KNode/0.10.4 wrote:
> why dont u try something like this
> this is done with all headers

First thing here: you are not allowed to use names with two consecutive
underscores. Further, to bar that question, names beginning with an
underscore and a capital letter are also reserved.

> #include <iostream>
> // class definitions
> //function definitions
> #endif
> This would automatically take care of duplicacy.

No it doesn't. This only works against multiple inclusion into a single
translation unit (typically one .cpp file). In the next TU those macros
are again undefined and the code will be included again.

[fullquote snipped]



reply via email to

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