no operator defined...这个错是什么意思?急!

来源:百度知道 编辑:UC知道 时间:2024/05/18 11:10:57
#include "header.h"
main(){
string input,output;
SqStack S;
InitStack(S);
cout<<"请输入串:";
cin>>input; (此行有错)
output=convert(input,S);
cout<<"后缀串为:";
for(int i=output.length()-1;i>=0;i--)//9)求输出串的逆序。
cout<<output[i];
cout<<endl;
return 0;
}
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 conversion)
这个错是什么意思呀?急求解答!

运算符没有定义。在前面再加个
#include <iostream>
using namespace std;

豆可以了吧。
这种问题经常遇到,一不小心就是这样。

加了#include<iostream.h>没?