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

Re: Problems with g++



Hamish:
> On Sun, Jul 11, 1999 at 09:19:45AM +0200, Ralf W. Stephan wrote:
> > You seem to be using C++ like you maybe did with C.
> > I'd like to advise against that.
> > In a OO language, globals are bad.
> 
> ?? The same problem would occur with declaring variables in .h files in C.

I was trying to tell Ivan why I think globals per se are bad.
Before I step back, let me add that the problem with globals
is that every code can write to them, be it C or C++.

> C++ needs #ifndef/#endif to avoid duplicate class definitions.

That's why gcc once had '#pragma interface' but it was dropped
for standard reasons.

ralf
-- 
http://home.t-online.de/home/Ralf_W.Stephan/
It's not a cat, it's DNA playing a cat MUD.


Reply to: