error C2679
来源:互联网 发布:现代商友软件 编辑:程序博客网 时间:2024/05/16 10:38
#include<conio.h>
#include<iostream>
#include<cstring>
#include<vector>
using namespace std;
int main()
{
const string str1 = "Mary and Linda";
const string str2 = " are friends.";
string str = str1;
str += str2;
std::cout<<str<<endl;
getch();
return 0;
#include<iostream>
#include<cstring>
#include<vector>
using namespace std;
int main()
{
const string str1 = "Mary and Linda";
const string str2 = " are friends.";
string str = str1;
str += str2;
std::cout<<str<<endl;
getch();
return 0;
}
提示错误:
新建文本文档.cpp
C:\Users\WUQ\Desktop\c++ plus\新建文本文档.cpp(16) : error C2679: binary '<<' : no operator defined which takes a right-hand operand of type 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' (or there is no ac
ceptable conversion)
Error executing cl.exe.
删除#include<cstring>中的c即可解决
0 0
- error C2679
- error C2679
- error C2679: binary '>>'
- vs2010 error c2679 binary
- error C2679: binary '<<' : no operator found 解决办法
- VC编译器下如何解决error C2679、error C2676、error C2784、fatal error C1903错误
- error C2679: binary ',class std::allocator >' (or there is no accept
- 重载"&amp;gt;&amp;gt;"时遇到的错误error C2679
- error C2679: 二进制“”类型的右操作数的运算符(或没有可接受的转换)
- error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'std::wstring'
- error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'std::string'
- error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'std::string'
- error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'std::wstring'
- error C2679: binary '<<' : no operator defined which takes a right-hand operand of type 'class Stude
- error C2679: binary '<<' : no operator defined which takes a right-hand operand of type '' (or there is no acceptable conversion
- error C2679: binary '<<' : no operator defined which takes a right-hand operand of type '' (or there is no acceptable conversion
- 错误1error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'std::str
- 解决 C++错误 error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'class CString' (or there is no
- 图像处理中 BMP 和JPG等格式的说明
- LabVIEW上位机与串口通信
- linux调优 性能优化
- Largest Rectangle in Histogram [leetcode]
- web.xml 详细介绍
- error C2679
- 最小树形图 朱刘算法
- OpenVPN多处理之-最新架构
- opencv透视变换cvWarpPerspective实例
- LeetCode -- Word Ladder II
- Java网络基础之套接字
- Android基本组件——Activity详解
- linux安装配置LAMP环境
- CentOS配置smaba与Windows共享文件