#include<iostream>
#include<string>
using namespace std;
int main(){
string str;
cout<<str<<""<<str.empty()<<endl; //用str.empty檢測字符串是否為空 (0,1)
cout<<str<<endl; //無參數
string str1(5,'a'); //給str5個字符a
cout<<str1<<""<<str1.empty()<<endl;
cout<<str1<<endl;
string str2("abcde"); //字符串初始化
cout<<str2<<endl;
string str3("abcde",3); //str的前幾個
cout<<str3<<endl;
string str4(str2,2,3); //str中間幾個
cout<<str4<<endl;
string str5(str2); //str的拷貝構造
cout<<str5<<endl;
system("pause");
return 0;
}