I need to work with a binary number.
I tried writing:
const x = 00010000;
But it didn\'t work.
I know that I can use an hex
template struct bin { enum { value = (N%10)+2*bin::value }; } ; template<> struct bin<0> { enum { value = 0 }; } ; // ... std::cout << bin<1000>::value << '\n';
The leftmost digit of the literal still has to be 1, but nonetheless.