How can I check whether an initialized variable in c++ has integral value or floating point value?
The sample code block is shown below:
int main()
{   
    double number = 9.99;
    if (/*Checks whether the value of the 'number' is an integral*/)
        cout << "The 'number' has an integral value";
    else
        cout << "It's not an integral value" // This condition will true if 'number' has a floating point number
    return 0;
}