Thanks it works.....
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
error message
run.cpp:63: error: conversion from ‘char_string’ to non-scalar type
‘boost::interprocess_container::basic_string
This is ok but i have to convert string into boost string. if i use the method as suggested.
string s = "hello"; char_string y = ts;
You probably want this:
char_string cs(s.c_str(), alloc_inst);
Chris -- echo mailto: NOSPAM !#$.'<*>'|sed 's. ..'|tr "<*> !#:2" org@fr33z3 _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- View this message in context: http://www.nabble.com/How-to-convert-std%3A%3Astring-into-basic_string-tp254... Sent from the Boost - Users mailing list archive at Nabble.com.