You can't call "printf" with a std::string in parameter.
The "%s" is designed for C-style string : char* or char [].
In C++ you can do like that :
#include
std::cout << YourString << std::endl;
If you absolutely want to use printf, you can use the "c_str()" method that give a char* representation of your string.
printf("%s\n",YourString.c_str())