View Single Post
  #7 (permalink)  
Old 08-30-2009, 02:45 PM
Joe Smith
Guest
 
Posts: n/a
Default Re: Performance Factors in C++


Carlo Milanesi <carlo.nospam.milanesi@libero.it> wrote:
> Sada wrote:
> [snip]
>> Is memcpy() is better than strcpy()?

>
> No.


Memcpy() might be better than strcopy, iff you happen to already have the
size of the null terminated character array you wish to copy. If you need to

determine that by calling strlen() first, then you would be better off just
calling strcopy().



--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Reply With Quote