How Would i be able to check for valid input on cin or getline
heres what i have
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
string word;
getline(cin, word);
cout << word;
system("PAUSE");
return EXIT_SUCCESS;
}
what i mean by valid input is either if the user enters an integer when i wanted a string or if the user enters nothing and causes weird results