cout << "Press Enter to Continue";
cin.ignore();
or, better:
#include <limits>
cout << "Press Enter to Continue";
cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
More Related Contents:
- c++ if specific words from string
- std::cin input with spaces?
- How to read cin with whitespace up until a newline character?
- cin.getline() is skipping an input in C++ [duplicate]
- What is the most efficient C++ method to split a string based on a particular delimiter similar to split method in python? [closed]
- cannot convert ‘std::string’ to ‘char**’ for argument ‘1’ to ‘__ssize_t getline(char**, size_t*, FILE*)’
- How do I flush the cin buffer?
- cin and getline skipping input [duplicate]
- How do I iterate over cin line by line in C++?
- Is a string literal in С++ created in static memory?
- Will std::string always be null-terminated in C++11?
- Sizeof string literal
- getline not asking for input? [duplicate]
- stringstream, string, and char* conversion confusion
- How to compare multiple strings inside an if statement?
- How to implode a vector of strings into a string (the elegant way)
- Fast String Hashing Algorithm with low collision rates with 32 bit integer [closed]
- Convert a string to a date in C++
- std::strings’s capacity(), reserve() & resize() functions
- splitting a string into an array in C++ without using vector
- Most optimized way of concatenation in strings
- How do I print the full value of a long string in gdb?
- cin >> fails with bigger numbers but works with smaller ones?
- comparison between string literal
- C++ Extract number from the middle of a string
- Parse string containing numbers into integer array
- C++ Passing std::string by reference to function in dll
- Concatenate compile-time strings in a template at compile time?
- C++ most efficient way to convert string to int (faster than atoi)
- How do I include the string header?