面试题答案
一键面试#include <iostream>
#include <string>
int main() {
std::string str = "Hello, World!";
size_t pos = str.find("World");
if (pos != std::string::npos) {
str.replace(pos, 5, "C++");
}
std::cout << str << std::endl;
return 0;
}