diff --git a/cpp/myfunc.cpp b/cpp/myfunc.cpp index 7d865b6..f519d24 100644 --- a/cpp/myfunc.cpp +++ b/cpp/myfunc.cpp @@ -1,8 +1,7 @@ #include "myfunc.h" -#include -int strncmp(const char* s1, const char* s2, size_t n) { - for (size_t i = 0; i < n; i++) { +int strncmp(const char* s1, const char* s2, int n) { + for (int i = 0; i < n; i++) { if (s1[i] != s2[i]) { return (unsigned char)s1[i] - (unsigned char)s2[i]; }