fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <limits>
  4.  
  5. int main()
  6. {
  7. std::string line;
  8.  
  9. // Ignore the rest of the line.
  10. std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
  11.  
  12. getline(std::cin,line);
  13. std::cout << line << std::endl;
  14.  
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 3464KB
stdin
Line to ignore.
Line to NOT ignore.
stdout
Line to NOT ignore.