第20092题 单选题
给定C++字符串分割代码,横线处填入哪项可输出指定结果"gesp ccf org cn "?
#include <iostream>
using namespace std;

int main() {
  string str = "gesp.ccf.org.cn";

  string delimiter = ".";
  string result="";
  string token;
  size_t found = str.find(delimiter);
  while (found != string::npos) {
   token = str.substr(0, found);
   result += token;
   result += " ";
   __________________________ // 在此处填入代码
   found = str.find(delimiter);
  }

  //最后一部分
  result += str;
  result += " ";

  cout << result << endl;
  return 0;
}
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析