gcc in Mdk 8.0 - I am screwed...
Richard Moore
rich at ipso-facto.freeserve.co.uk
Thu Jun 28 15:23:38 UTC 2001
bretzel wrote:
>
> Hi,
> I know I am not in the right place to get answers for this but
> I cannot find no other places to ask...So maybe one is kind enough
> here to enlighten me ...
>
> My new Linux installation is Mdk8.0
> and the compiler is:
> [bretzel at bretzel ip]$ g++ -v
> Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux/2.96/specs
> gcc version 2.96 20000731 (Linux-Mandrake 8.0 2.96-0.48mdk)
>
> -> Weird compile error :
>
> EnumTest { n1,n2,n3, n4 };
> EnumTest ET=n1;
> [...]
> ++ET;
> "g++ -c -o main.o main.cpp
> main.cpp: In function `int main (int, char **)':
> main.cpp:201: no match for `++EnumTest &' "
>
> Thus, this construction is not valid anymore:
> "for( ET=n1; ET<=n3; ++ET)"
> I was used to do it ;-)
>
> Now I must iterate enums vars casted to int vars then cast back
> int vars to enums vars... whoa!
Might be a gcc 2.96 weirdness.
>
> In Mdk7.2 and - , I never got error about that ...
>
> ...And I 've also discovered that I lack important C++ knowledges:
> What is the difference(s) between
> (const?) int method(); AND
> (const?) int method() const; ??
^^ This const indicates that the object
the method is called on will not be modified
(and thereby indicates that the method can be
called via a const reference to the object).
You can use the mutable modifier for member
variables like reference counts and caches
which may be modified in a const method.
^^^ This const indicates the return value is const
Cheers
Rich.
>
> I need to be enlighted...
>
> Thanks.
>
> Bretzel
>
> -
> to unsubscribe from this list send an email to kdevelop-devel-request at kdevelop.org with the following body:
> unsubscribe »your-email-address«
-
to unsubscribe from this list send an email to kdevelop-devel-request at kdevelop.org with the following body:
unsubscribe »your-email-address«
More information about the KDevelop-devel
mailing list