snprintf vs strcpy(etc) in c

Posted by monkeyking on Stack Overflow See other posts from Stack Overflow or by monkeyking
Published on 2010-04-09T10:12:28Z Indexed on 2010/04/09 10:53 UTC
Read the original article Hit count: 382

Filed under:
|
|
|

For doing string concatenation I've been doing basic strcpy,strncpy of char* buffers. Then I learned about the snprintf and friends.

Should I stick with my strcpy,strcpy + \0 terminiation. Or should I just use snprintf in the future?

thanks

© Stack Overflow or respective owner

Related posts about c

    Related posts about printf