C++11 adds an overload that takes a std::string. you're likely using an older compiler, or you're not enabling the features of C++11. if you're using GCC/G++ 4.4 or above, you can add the compiler...