io/ignoreparam1.cpp

The following code example is taken from the book
The C++ Standard Library - A Tutorial and Reference
by Nicolai M. Josuttis, Addison-Wesley, 1999
© Copyright Nicolai M. Josuttis 1999


#include <iostream>
#include "ignoreparam.hpp"

int main()
{
    char c;
    std::cout << "ignore two lines and print frist character following them\n";
    std::cin >> ignore(2) >> c;
    std::cout << "c: " << c << std::endl;
}