If I prompt the user to enter an integer but what if the user enters a char or a string. How to prompt the user to enter in the correct data type?
#include<iostream>
using namespace std;
int main(){
int num;
cout<< "Enter number: ";
cin>> num;
}