User Profile
Collapse
-
-
thx donbock for the quick reply.
What if I am not sure what my destination and/or source buffer length is?
also you said that "If the source string is longer than the destination buffer then strncpy won't null-terminate the destination string. You must not treat the destination buffer as a string until after it is null-terminated"
So in that case what will happen if it does not null-terminate my string?...Leave a comment:
-
strcpy and strncpy
Hi,
I am a newbie to C++ (and programming in general)
I have the following:
char* fOutMsg;
strcpy(fOutMsg, "03DS2");
--------------------------------------------------------------
in another place:
char fPpn[32] = {0};
strcpy(fPpn, " ");
-------------------------------------------------------------------...
No activity results to display
Show More
Leave a comment: