Re: strdup/strcpy

From: Mark Garringer (zizazat@hotmail.com)
Date: 11/06/02


I seem to be having a really hard time with this, so I hope someone can give
me a quick answer (and maybe a slap on the head).

Since I have added additional currency types to my game, I have done some
minor changes to create_money. But I need to get the currency type added to
the keyword list.

The code now is very direct, obj->name = strdup("coins gold");

But what I need to so is something like: obj->name = strdup("coins
currency_types[cur]");

cur is an integer I passed into create_money. I don't want (obviously) the
literal string 'currency_types[cur]' in my object name list.

Anyone, please?

--Ziz

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT