string型別支援長度可改變的字元陣列
提供大量的函式
屬於C++ STL容器庫
使用string的程式必須先引入函數庫
#include <string>
定義 string 並初始化
string str1; // str1將會是個空字串
string str2 = "Fudan"; // 把str2初始化為字串字面常數的副本
string str3("Fudan"); // 把str3初始化為字串字面常數的副本
Are you sure to leave this team?
Once you delete your team, all team notes will be deleted and cannot be recovered. Please ensure you've exported or transfered these notes.
Enter team name before deleting it:
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up