What\'s the easiest way to truncate a C++ float variable that has a value of 0.6000002 to a value of 0.6000 and store it back in the variable?
Realistically that's not possible. It's not a C++ limitation, but just the way floating point works. For many values there are no precise representations, so you can't simply truncate to a number of digits.
You could truncate when printing using printf format strings.
If you really need to be able to store only a limited number of digits, I suggest you use a fixed-precision data type instead.