conrad wrote:
> What are some of the fundamental differences
> between const in C++ and const in C?
>
It works as one would expect in C++ and it's a bit broken in C?
In C, a const integer type isn't a compile time constant while in C++ it is.
>
> In C, the above is a pointer to type
> "pointer to char read-only" and so
> assignments like the following
> cannot be made:
> const char **foo;
> char **baz;
> foo = baz;
>
> But in C++, I think I remember
> reading that this works.
>
In C, you could get away with this (I'm not sure if the compiler is
required to issue a diagnostic), in C++, it is an error.
--
Ian Collins.