ok, I was C++-ifying the CircleMUD base (my hacked up version of it that is, not stock) and i was wondering something about Macros that I never thought i'd be asking. ok, if you don't know what i mean when i say send_to_charf(ch, "string", fmt, etc, etc); then ignore this post. I don't need confusion, just answers. ok, in my process of moving to C++, i created a printf() member function in class/struct char_data char_data::printf() which is just like printf. so I can do ch->printf("string %s %d", anotherstring, aninteger); well, what i've done with the ch->print() was use send_to_char() as a macro like so #define send_to_char(messg, ch) (ch)->print(messg) I was wondering if it was possible to do that with send_to_charf ie #define send_to_charf(ch, messg) (ch)->printf(messg) and possibly it would accept messg as all the excess pointers and stuff send_to_charf(ch, "messg %s %d %d", string, number, number); would be changed in the preprocessor to ch->printf("messg %s %d %d", string, number, number); is this possible? this is just to save my future coders trouble in trying to understand what i've done to CircleMUD. Thanks for any help. Akuma theRaging Coder +----------------------------------------------------------------+ | "Yea, though I code in the Valley of the Shadow of No | | Documentation, I will fear no task: for thy C Book is with me" | | "Nothing is IMPOSSIBLE, Just IMPROBABLE" | | "Easier Said Than Done, But Better Done Than Said..." | +----------------------------------------------------------------+ +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/08/00 PST