
13 Jul
2005
13 Jul
'05
3:26 p.m.
Russell Hind <rh_gmane@mac.com> writes:
Vladimir Prus wrote:
Why is that better than
unsigned x = strtoul("1010010001000010000001", 0, 2);
? I believe that 'strtoul' is part of C99.
When I've done something similar to the binary template, it was for compile-time calculations, whereas strtoul I assume is a runtime call.
Not to mention that the number is a lot easier to read when divided into nibbles ;-) -- Dave Abrahams Boost Consulting www.boost-consulting.com