如下代码:
愿意第一行最后一段输出小写"|"<<strlwr(s),实际却是大写?
#include <iostream>
#include <string>
#include <string.h>
using std::string;
using std::endl;
using std::cout;
int main() {
string ss;
char* s=new char[20];
ss="wrtty";
strcpy(s,ss.c_str());
cout << ss <<strupr(s)<<"|"<<strlwr(s)<< endl;
cout << strlwr(s)<< endl;
return 0;
}
wrttyWRTTY|WRTTY
wrtty
Process finished with exit code 0