65,206
社区成员
发帖
与我相关
我的任务
分享#include <iostream>
using namespace std;
int main()
{
string str = "123";
string* ps = &str;
cout << (*ps).size() << endl;
cout << ps->size() << endl; // (*ps).foo 一般写成 ps->foo
return 0;
}
