1// skipws flag example
2#include <iostream> // std::cout, std::skipws, std::noskipws
3#include <sstream> // std::istringstream
4
5int main () {
6 char a, b, c;
7
8 std::istringstream iss (" 123");
9 iss >> std::skipws >> a >> b >> c;
10 std::cout << a << b << c << '\n';
11
12 iss.seekg(0);
13 iss >> std::noskipws >> a >> b >> c;
14 std::cout << a << b << c << '\n';
15 return 0;
16}