How do you check to see if the user didn\'t input anything at a cin command and simply pressed enter?
int main(){ string str[100]; std::cout<<"Hello how are you ? \n"; std::cin>>str; if(str.length() > 0){ // If input is seen } else{ // If input is not seen } }
Any problem let me know.