Boost logo

Boost Users :

Subject: Re: [Boost-users] How to convert std::string into basic_string
From: Christoph Gysin (christoph.gysin_at_[hidden])
Date: 2009-09-17 04:59:53


> But after loading into the map when i try to get the value how can i do the
> reverse.i.e converting char_string into string
>
> std::string s = "test";             // OK
> char_string cs(s.c_str(), alloc_inst);   // OK and thanks
> string y = (char_string) cs;               // pblm

string y(cs.c_str());

Chris

-- 
echo mailto: NOSPAM !#$.'<*>'|sed 's. ..'|tr "<*> !#:2" org_at_fr33z3

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