Given that using a float makes no sense there, what exactly are you trying to do? What answer to
5.14%2
are you looking for?
For example you can write
g = a % static_cast<int>( b );
Take into acccount that after the statement
a=5.14;
a will have value equal to 5 because a is defined as int.
i want to do this:
5.14%2=1.14
how will do it?
when i run it ,it tell me that float cant take this(%),so what should i do?
what does g = a % static_cast<int>( b );
means ??!
The same as a % b only b was converted to int.