The code is a bit long, but I basically just need something that will allow my code to continue on as normal if you hit enter (like cin.get() would do), but also allows me to input a string and have it do something else. What can I do?
First time poster, by the way. I appreciate any help. :)
EDIT: Also, sorry if I got any terminology wrong, I'm still relatively new to C++.
You can use its >> operator or you can use std::cin.getline. (std::getline for stl strings)
1 2 3 4 5 6 7 8 9 10
#include <iostream>
#include <string>
int main()
{
std::string str;
std::cin >> str; // For formatted input (will split input by spaces and leave newlines)
std::getline(std::cin, str); // For unformatted input (will store the entire input into the string)
return 0;
}