File tree Expand file tree Collapse file tree 1 file changed +15
-15
lines changed
Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -30,21 +30,21 @@ namespace std {
3030#include <string>
3131
3232int main() {
33- // マニピュレータとして使用
34- {
35- std::istringstream ss(" 42");
36- std::string line;
37- std::getline(ss >> std::ws, line);
38- std::cout << line << std::endl; // "42"
39- }
40-
41- // 関数として使用(通常はしない)
42- {
43- std::istringstream ss(" 42");
44- std::cout << ss.tellg() << std::endl; // "0"
45- std::ws(ss);
46- std::cout << ss.tellg() << std::endl; // "3"
47- }
33+ // マニピュレータとして使用
34+ {
35+ std::istringstream ss(" 42");
36+ std::string line;
37+ std::getline(ss >> std::ws, line);
38+ std::cout << line << std::endl; // "42"
39+ }
40+
41+ // 関数として使用(通常はしない)
42+ {
43+ std::istringstream ss(" 42");
44+ std::cout << ss.tellg() << std::endl; // "0"
45+ std::ws(ss);
46+ std::cout << ss.tellg() << std::endl; // "3"
47+ }
4848}
4949```
5050
You can’t perform that action at this time.
0 commit comments