Checks if parameter c is either an uppercase or a lowercase alphabetic letter.
if the string passes the check, then we can safely assume that it is all digits. also, the dot in the double will not be considered as an alphabet. then you use atof, and convert it into double. you could read more in http://www.cplusplus.com/reference/clibrary/cstdlib/atof/
double number ;
while( std::cout << "number? " && std::cin >> number )
{
// do whatever with number
}
// clear the error state and discard invalid input
std::cin.clear() ;
std::cin.ignore( 1024, '\n' ) ;
// use std::cin again