C++尝试使用toupper函数但是
#include <bits/stdc++.h> int main(){ char x; std::cin>>x; toupper(x); std::cout<<x; }
这种情况无法转换大写但是
#include <bits/stdc++.h> int main(){ char x; std::cin>>x; char y=toupper(x); std::cout<<y; }
用另外的变量二次赋值就可以了,感谢