📜  在 cpp 中迭代字符串 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:55.024000             🧑  作者: Mango

代码示例1
std::string s("Hello world");

for (char & c : s)
{
    std::cout << "One character: " << c << "\n";
    c = '*';
}