这是我的代码,如何修复此错误?
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
string title = "THE WORLD OF PIRATES";
cout << title << endl;
cout << " Welcome to the world of pirates";
cin.get();
return 0;
}
Run Code Online (Sandbox Code Playgroud)
错误是
binary '<<' : no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion)
Run Code Online (Sandbox Code Playgroud)