manish4gupta wrote:
I am trying to store the index file (keyword , position) where keyword is string while position is long. But before doing that i am doing some benchmarking for the given code in which map is created as key, value. Where key is char_string (typedef of basic_string) but when i read the data using C++, it will be string. So my intention is to convert string into char_string. For that i am testing to convert std:: string s = "test" into char_string. But getting the error message. Please do help me.
Hi, sorry, but that is not even close to a minimal example. Your problem is somewhere here (as you stated in another mail): std::string s = "test"; // OK char_string cs(s.c_str(), alloc_inst); // OK and thanks string y = (char_string) cs; // pblm Is you could send a sample program with just these lines in the main function and the required includes/typedefs. Nothing more. Lets focus on the problem, please. Regards, Roland