The std::string is API is documented here: http://www.cplusplus.com/reference/string/string/
As you can confirm, there is no to_string() method associated with that object type.
If you want to insert a double into a string, perhaps with other text, then something like this is typically done:
Code:
#include <sstream>
#include <string>
...
double value = 3.145;
...
std::stringstream ss;
ss << "The value is: " << value;
...
std::string str = ss.str(); // unnecessary step, but shown to demonstrate how to obtain the string from stringstream.
EDIT: It seems I misunderstood your post; there is an std::to_string() function available, that accepts a wide variety of types, and returns an std::string. This function is only available with C++0X standards. To compile your application with such, use the -std=c++0x compiler option.
Bookmarks