Trouble with std::out << std::string

Hi,
The strangest thing: I am having the following code giving me compilation problems:
1
2
std::string s{ "go" };
std::cout << s;

I get:
error C2679: binary '<<': no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion)


Makes no sense to me!!

Thanks

Juan
Check the includes:
1
2
#include <iostream>
#include <string> 
Got it, thanks!!
Topic archived. No new replies allowed.