A
anchitgood
Hi,
Please consider the following code:
{
int model; //stores model of a car
cout<<"Enter model of the car :";
cin>>model;
}
Now if the user enters a non - int value (say char), then how can i
show a message "Invalid Entry" instead the program gets terminated?
Please consider the following code:
{
int model; //stores model of a car
cout<<"Enter model of the car :";
cin>>model;
}
Now if the user enters a non - int value (say char), then how can i
show a message "Invalid Entry" instead the program gets terminated?