代码: std::string s="aaa"; printf("%s\n",s); 编译报错: error: cannot pass objects of non-trivially-copyable type ‘std::string {aka class std::basic_string}’ through ‘...’ 修改: printf("%s\n",s.c_str());