#include <iostream>
using namespace std;
//count length of char array
int strlen(char* str) {
int i = 0;
while (*str++ != '\0') {
i++;
}
return i;
C++ 动态分配的strcyp函数
最新推荐文章于 2024-08-03 11:47:07 发布
#include <iostream>
using namespace std;
//count length of char array
int strlen(char* str) {
int i = 0;
while (*str++ != '\0') {
i++;
}
return i;