怎样用C++ 输入字符串,统计出字符串的个数,并输出该字符串?

2025-03-13 16:38:01
推荐回答(1个)
回答1:

std::string str;
std::cin >> str;
std::cout << str.size() << "," << str << std::endl;