首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

调试的一个异常

2012-03-06 
调试的一个错误errorC2679:binary :nooperatordefinedwhichtakesaright-handoperandoftypeclassstd::bas

调试的一个错误
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   acceptable   convers

这个错误什么意思,怎么解决?

[解决办法]
你是#include <iostream.h> 了?
用#include <iostream>
#include <string>
using namespace std;
[解决办法]
#include <isotream.h> 是老一点的用法
#include <isotream>
using namespace std;
是现在的用法,一般情况下两者没有什么区别,这根据编译器的不同而有区别。

热点排行