清除字符串中非字母数字字符[C++]

//http://www.cplusplus.com/forum/beginner/148876/ #include <iostream> #include <string> #include <cctype> #include <algorithm> int main() { const std::string str = "it. is? awesome!"; { // simple std::string a; for (char c : str) if (std::isalnum(c)) a += c; std::cout…