On Thu, 4 Feb 1999, Christina Orr wrote:
>I hate to bother you with such a lame question and I feel really ignorant
>asking this but what do you mean by typecast? I'm a novice coder and have
>temporarily lost my C book so I'm a little lost as to what you mean. I
>realize that these are just warnings but there are quite a few of them so I
>would like to clean them up.
>
>Many apologies for bothering you with this,
char *changeme;
long imanaddress = (long)changeme;
int *imanumberpointer = (int *)imanumber;
const char *dontchangeme = (const char *)changeme;
char foo = (char)'s';
Most of those are silly, but you get the (idea) of it.
^ ^
Basically it's a way for you to tell the compiler that you're smarter than
it is. It's also a great way to crash a program if you use them
gratuitously.
--
George Greer
greerga@circlemud.org
http://www.van.m-l.org/CircleMUD/OasisOLC/
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST