CppLearner
CppLearner

Reputation: 17040

Where is <boost/lexcal_cast.hpp>?

I just downloaded boost 1.4.7.0, but compiler can't find boost/lexcal_cast.hpp

I am trying to convert a string to number using boost. Sample code:

#include <boost/lexcal_cast.hpp>

// ...
int i = 42;
std::string s = boost::lexical_cast<std::string>(i);
int j = boost::lexical_cast<int>(s)

Where can I find that??? Do I need additional library beside the standard?

Thanks.

Upvotes: 0

Views: 612

Answers (1)

Marcelo Cantos
Marcelo Cantos

Reputation: 185922

Have you tried <boost/lexical_cast.hpp>? You're missing an ‘i’.

Upvotes: 5

Related Questions