Hi I am unable to reverse the binary representation of a number is there an easy way to do it? Please?
Hi I am unable to reverse the binary representation of a number is there an easy way to do it? Please?
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*
Store the representation in a string, then reverse that string. Alternatively, access in reverse a std::bitset of that number.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
You mean change 12345 to 54321?
That's not difficult. You should use '%' operator.