Skip to content

Commit 67160f5

Browse files
committed
ws : サンプルコードのインデントを4→2に修正
1 parent 1a53cfe commit 67160f5

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

reference/istream/ws.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,21 @@ namespace std {
3030
#include <string>
3131
3232
int 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

0 commit comments

Comments
 (0)