c++ 字符串、向量和數組 2018.3.30

1、標準庫類型string表示可邊長的字符序列,定義在命名空間std中,要使用的話:         #include <string>         using std::string;         string s1; 2、讀取未知數量的string對象:         while (cin >> word)... 3、使用getline讀取一整行     getline從輸入流中讀取
相關文章
相關標籤/搜索