help-gplusplus
[Top][All Lists]
Advanced

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

Re: strange error "changes meaning ..."


From: jk
Subject: Re: strange error "changes meaning ..."
Date: Sat, 29 Jan 2005 22:41:46 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616

The above fails with the same error message with g++ 2.95, 3.3,
3.3.2, 3.4.3 and '4.0.0 20040919 (experimental)'.

Surprisingly, it succeeds with gcc-3.4.0.

[...]

The solution is trivial: replace

    Consumer::Consumer Consumer;

with

    Consumer::Consumer consumer;    // or
    Consumer::Consumer consumer_;   // or
    Consumer::Consumer theConsumer; // or

Note, that one of the widely-accepted naming conventions is to use
types that begin with a capital letter and variables that do not.
Naming both variables and types the same is certainly confusing,
and generally considered a bad style (TM).
thanks, this helps quite a bit ... it is strange that some compilers accept it some do not ...

Anyway, I will wait for the next C++-error :) here
Jörg

--
================= lat=52.35°N - lon=10.25°E ======================
http://www.ibk-consult.de

reply via email to

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