Boost logo

Boost Users :

From: maha.ramanan_at_[hidden]
Date: 2005-02-23 05:16:46


Hi,

I am quite new to the iostreams and lexical cast and hence bear with me of
any lack of knowledge.
I am using the lexical cast in the following manner:

unsigned int data_value = boost::lexical_cast<unsigned int>("0xFF");

The above comes out with a runtime bad_lexical_cast error. I understood, by
default, the streams (stringstream used by lexical cast) should be able to
automatically identify the radix of the input and convert it automatically.

Is my above undestanding correct?
Is lexical_cast meant to be used in this situation?

Thanks for your help?
Ram
=======================================================================================

Mahadevan Ramanan
Design Technology Centre
DTG - Philips Semiconductors
Milbrook Industrial Estate
Tel: +44 (0) 23 8031 2540
Southampton, Hants SO15 0DJ
Fax: +44 (0) 23 8031 2642
UK
======================================================================================

The information contained in this message is confidential and may be
legally privileged. The message is intended solely for the addressee(s). If
you are not the intended recipient, you are hereby notified that any use,
dissemination, or reproduction is strictly prohibited and may be unlawful.
If you are not the intended recipient, please contact the sender by return
e-mail and destroy all copies of the original message.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net