Hi I am unable to reverse the binary representation of a number is there an easy way to do it? Please?
This is a discussion on Reverse a number within the C++ Programming forums, part of the General Programming Boards category; Hi I am unable to reverse the binary representation of a number is there an easy way to do it? ...
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.
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
You mean change 12345 to 54321?
That's not difficult. You should use '%' operator.