Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //字串的基本宣告、定義、組合
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- string s1;
- s1="this is s1";
- string s2="this is s2";
- string s3="this is";
- s3=s3.append(" s3");
- string s4="this is";
- s4+=" s4";
- cout<<s1<<endl<<s2<<endl<<s3<<endl<<s4<<endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment