Im new to C++ and im following a guide on cin he used a getline() function for the program to wait until the client presses enter to close the program, it works for him, but my program still instantly closes after i put the first input in. (I DO NOT WANT THE USER TO HAVE TO TYPE SOMETHING SO PLEASE DO NOT MARK AS A DUPLICATE!)
#include <iostream>
#include <filesystem>
#include <string>
using namespace std;
int main()
{
string santype;
cout << "What type of sandwhich you want kid?" << endl;
cin >> santype;
cout << "Creating " << santype << " Sandwhich" << endl;
cout << "Press Enter To Exit..";
getline(cin, santype);
}