Converting an integer to a STL bitset
May 11, 2010 at 11:52am UTC
I am looking for a STL function that converts an integer to a STL bitset.
Please suggest.
May 11, 2010 at 11:59am UTC
How about the constructor
bitset ( unsigned long val )
?
You would have to fiddle with signs and two complement and such things yourself...
May 12, 2010 at 12:28pm UTC
Good idea. Thank you.
ps: I plan to buy a STL book. Could you suggest?
May 12, 2010 at 12:41pm UTC
Generic Programming and the STL: Using and Extending the C++ Standard Template Library by Matthew H. Austern is a great book on the STL and it's easy to follow.
Topic archived. No new replies allowed.