Mail Archives: djgpp/2000/11/30/12:51:34
In comp.lang.c Bob Lied <lied AT w-lied DOT ih DOT lucent DOT com> wrote:
> Qualifiers are "const" and "volatile".
And restrict, in C99! (If you're using DJGPP with gcc 2.95.2 rather
than 2.7.2.1, you can use this already as __restrict, BTW!)
> mem_err("yada yada", const_cast<char *>names_east[i]);
const_cast<char *> is only safe if the object wasn't originally declared
const, so this is a bad idea even in C++.
What's more, C has no const_cast<char *>. Its C equivalent is (char *).
This is forgivable because you're posting on the DJGPP newsgroup, no
doubt, but over here in comp.lang.c we like to make little distinctions
like this clear :-)
--
naisbodo AT enteract DOT com
http://www.naisbodo.com/
- Raw text -