摘要:
#include<iostream> using namespace std; #include<string> int main() { string str = "hello world!"; cout << str << endl; cin >> str; cout << str << end 阅读全文
摘要:
#include<iostream> using namespace std; #include<string> int main() { //创建bool数据类型 bool flag = true; cout << flag << endl; flag = false; cout << flag 阅读全文
摘要:
C风格字符串:char 变量名[ ]="字符串值 " int main() { char str[] = "hello world!"; cout << str << endl; system("pause"); return 0; } 2. C++风格的字符串:string 变量名 = “字符串值 阅读全文