At first glance, I believe that doing a mod by 1 will work. That will return any remainders you may have, then you can compare the remainder against 0 to see if there is one.

Code:
cout << "Please enter your number: ";
 cin >> integer;

 remainder = integer%1;
if(remainder == 0)
{
// do integer stuff
}
else
{
// do non-integer stuff
}