Re: strdup/strcpy

From: Mark Garringer (
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

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


The new MSN 8: smart spam protection and 2 months FREE*

   | FAQ: |
   | Archives: |
   | Newbie List:   |

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