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 For example, GET_CLASS(ch) returns a char (look in structs.h) ie: 1 letter. To the compiler, chars are basically ints. You can trick the compiler into thinking that a char is an int by typecasting, ie: (int)GET_CLASS(ch) You can do this with any variable type, just put the type you want inside ()'s right before the variable you want to cast. Not the most detailed explanation, but it's the best I can do without plagurizing my C book ;) Hope it helps. "Misery is boundless" -Xual the Torturer, on the Eve of the Sundering. Danathara Online RPG telnet://danathara.ml.org:4000 +------------------------------------------------------------+ | 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