#include <iostream>
#include <math.h>
#include <conio.h>
using namespace std;
class hugeint
{
public:
int size;
int number[100];
friend istream& operator>>(istream&,hugeint&);
friend ostream& operator<<(ostream&,hugeint&);
};
istream& operator>>(istream& in,hugeint& c)
{
// code not shown
return in;
}
ostream& operator<<(ostream& out,hugeint& c)
{
return out;
}
void main()
{
system( "color 70" );
hugeint o;
hugeint y;
hugeint z;
cin >> o;
cout<<"now y "<<endl;
cin>>y;
}
编译器抱怨operator >>
含糊不清......我该怎么办?
答案 0 :(得分:1)
但请注意,我还删除了您的无关和非C ++标头,并修复了错误的main
返回类型。
答案 1 :(得分:-1)
尝试将operator<<
和operator>>
函数放入std
命名空间