摘要: #include<iostream> using namespace std; #include<string> int main() { string str = "hello world!"; cout << str << endl; cin >> str; cout << str << end 阅读全文
posted @ 2020-02-25 09:14 Jackie_Wang 阅读(160) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> using namespace std; #include<string> int main() { //创建bool数据类型 bool flag = true; cout << flag << endl; flag = false; cout << flag 阅读全文
posted @ 2020-02-25 08:57 Jackie_Wang 阅读(342) 评论(0) 推荐(0) 编辑
摘要: C风格字符串:char 变量名[ ]="字符串值 " int main() { char str[] = "hello world!"; cout << str << endl; system("pause"); return 0; } 2. C++风格的字符串:string 变量名 = “字符串值 阅读全文
posted @ 2020-02-25 08:50 Jackie_Wang 阅读(205) 评论(0) 推荐(0) 编辑