大小写转换 #include<string> #include<iostream> int main() { using namespace std; string A = "q" ; string B = "Q"; A[0] = toupper(A[0]); B[0] = tolower(B[0]); int a = A.size(); cout << a << endl << A << endl<<B; return 0; }