错误写法
string a;
printf("%s",a);
因为C语言中没有string,所以printf不能直接输出string
正确写法
#include <string>
string a;
printf("%s",a.c_str());