Hi, I have the following codewhich is supposed to use strncpy. Can anyone help, please:
int i
for( i = 0; i <= StringCapacity; i++ )
StringArray[i] = s[i];
StringArray[i] = '\0';
StringSize = StringCapacity;
These lines of code should use strncpy in order to get a much better solution.
Thank you very much!
int i
for( i = 0; i <= StringCapacity; i++ )
StringArray[i] = s[i];
StringArray[i] = '\0';
StringSize = StringCapacity;
These lines of code should use strncpy in order to get a much better solution.
Thank you very much!
Comment