Here's the question you clicked on:
nphuongsun93
C++. How do I check if there is a ' . ' in my data type long? for example: rational (0.9), I want to know if it's a decimal so I can convert it to a fraction.
A long variable cannot contain a fractional part, it is a long integer, which can only contain whole numbers. If you mean a float or double, you could use the modf function (see: http://www.cplusplus.com/reference/cmath/modf/ ) to split the number into an integer and fractional part.