c++ strlen()求字符串的长度

1.头文件 #include<cstring>

2.用法 char s[100];

cin>>s;

int n=strlen(s);

此时的n为串长

无聊就学习 反正没事干
原文地址:https://www.cnblogs.com/miao-xixixi/p/12904013.html