
This is ok but i have to convert string into boost string. if i use the method as suggested. string s = "hello"; std::basic_string<wchar_t> ts(s.begin(), s.end()); char_string y = ts; I am getting the following error. run.cpp: In function ‘int main()’: run.cpp:63: error: conversion from ‘std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >’ to non-scalar type ‘boost::interprocess_container::basic_string<char, std::char_traits<char>, boost::interprocess:allocator<char, boost::interprocess::segment_manager<char, :boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void>, 0u>, boost::interprocess::iset_index>
’ requested
I am new to boost-interprocess. I don't know much about this. Any example converting the std:: string/c-string into boost basic_string will help me. I will be really thankful to you.
basic_string is not boost, it's plain STL. from <string>: typedef basic_string<char> string; To assign two different basic_strings: std::string s = "foobar"; std::basic_string<wchar_t> ws(s.begin(), s.end()); 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.