#include
#include
using namespace std;
int main(){
string testString;
getline(cin, testString);
{
if you have
cin >> otherVariables
You need to delete the newline buffer in between by adding:
cin.ignore()
You should have something like:
string userMessage;
cin.ignore();
getline(cin, testString);