c++ how to check if a char is a number code example Example: c++ check if char is number char c = '1'; bool result = isdigit(c); cout << result << endl; //1