Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
109118 | scscscaa | 字符串反转 | C++ | Compile Error | 0 MS | 0 KB | 491 | 2025-01-27 21:54:54 |
std::string processTestCase(const std::string& testCase) { std::istringstream iss(testCase); std::string word; std::string result; bool firstWord = true; // 分割输入的字符串为单词 while (iss >> word) { // 反转每个单词 std::string reversedWord = reverseWord(word); if (!firstWord) { result += " "; } result += reversedWord; firstWord = false; } return result; }
Main.cc:1:6: error: 'string' in namespace 'std' does not name a type std::string processTestCase(const std::string& testCase) { ^