printf 输出字符串 需要加上 c_str()
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
using namespace std;
int main(){
string s = "哈哈";
cout << s << endl;
printf("a=%s", s.c_str());
std::cout << "Enter two numbers:" << std::endl;
system("pause");
}