the error: no operator << matches these operands

来源:互联网 发布:大数据 新型城镇化 编辑:程序博客网 时间:2024/04/29 10:36

string imageName;

cout <<"imageName is" <<  imageName <<endl;

 

the error: no operator << matches these operands这个出现的原因是在输出字符串的时候没有加头文件

the solution:

#include "iostream" 

#include<string>

原创粉丝点击