小编Ish*_*sal的帖子

用于c ++中的字符串的strlen

我已经将c ++转换为c类型字符串并使用strlen但它无法正常工作.

 #include<bits/stdc++.h>
using namespace std;
int main(){
string s("Hello");
s.c_str();
cout<<strlen(s);
}
Run Code Online (Sandbox Code Playgroud)

c++ string stl

-3
推荐指数
1
解决办法
279
查看次数

标签 统计

c++ ×1

stl ×1

string ×1