Skip to content

Conversation

wylloong
Copy link

if((newLength+1) > length)
return;
因为字符串末尾以'\0'结尾,所以newLength+1才是真实的字符数组长度。

wylloong added 3 commits July 23, 2017 13:11
if((newLength+1) > length)
        return;
因为字符串末尾以'\0'结尾,所以newLength+1才是真实的字符数组长度
I am trying to compile this C++ program in Ubuntu 16.4, but I am getting this error:
error: ‘memset’ was not declared in this scope.
So, I think you should include <string.h> (or its C++ equivalent, <cstring>).
int/int is int ,not a float.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant