Re: strdup/strcpy

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


> > money types as well.  I fixed it with snprintf() . . .
>That's a slight bit of overkill.  It should be sufficient to just do:
>
>       obj->name = strdup(currency_types[cur]);

I must apologize. I didn't quite make myself clear enough. I also want to
have the word "coins" in my name list, so when it's done there will be
"coins euros" in the obj->name list. I can get one or the other but not
both.

sprintf into buf
strdup "coins" into obj->name
strcpy buf into obj->name ??

--Ziz

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail

--
   +---------------------------------------------------------------+
   | 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