回答

3

是,touppercctype头声明。你可以将一个字符串的算法:

#include <algorithm> 
#include <iostream> 
#include <string> 
#include <cctype> 

int main() 
{ 
    std::string str("hello there"); 
    std::cout << str << '\n'; 

    std::transform(str.begin(), str.end(), str.begin(), std::toupper); 
    std::cout << str << '\n'; 
} 
+0

你需要范围解析操作 – 2010-11-17 13:03:38

+0

是否有何时使用TOUPPER(char)的任何建议,并TOUPPER(焦炭,语言环境)? – kangcz 2010-11-17 13:09:41

+0

@John:固定。/1更多去/ – 2011-08-25 06:21:27

0

喜在我们的项目中,我们使用升压/算法/串to_upper功能项目用于Windows和Linux