Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以::toupper对作为输入的同一字符串执行转换吗?
::toupper
IE:
std::transform(s.begin(), s.end(), s.begin(), ::toupper);
还是我需要不同的目标?
是的。这是合法的,而且非常地道。这是一种非常常见的方法。