(1) | istream& getline (istream& is, string& str, char delim); |
---|---|
(2) | istream& getline (istream& is, string& str); |
(1) | istream& getline (istream& is, string& str, char delim);istream& getline (istream&& is, string& str, char delim); |
---|---|
(2) | istream& getline (istream& is, string& str);istream& getline (istream&& is, string& str); |
flag | error |
---|---|
eofbit | 在其操作期間到達字元源的末尾。 |
failbit | 獲得的輸入不能被解釋為此型別物件的有效文字表示。 在這種情況下,distr保留呼叫之前的引數和內部資料。 請注意,某些eofbit情況也會設定failbit. |
badbit | 發生了上述以外的錯誤。 |
|
|