I am facing difficulty while checking the integer number. If user enters only character or only special character or only integer or any special character before integer I'm able to find it but in case of special character after the integer is not handling. so any one please help me out.
port:cout << "Enter the port number:" << endl;
cin >> nPort;
if(!cin)
{
cout << "Invalid Port Number" << endl;
cin.clear();
cin.ignore(MAX_SIZE,'\n');
goto port;
}