Hello everyone, I am new here and I was wondering if anyone could please give me some help!...I have a program that is just driving me nuts and I was wondering if anyone could help me out?...here is the header....now when I run this program I get 52 errors but I just want to start with the first one and then work on it and see if I can contiune!...the first error is that it says: error C2804: binary 'operator <' has too many parameters
error C2333: 'CNum:perator`<'' : error in function declaration; skipping function...can anyone please explain to me why?...Thank you very much in advance and sorry to trouble you all if this is really simple:
Code:#ifndef __CNUM_H__ #define __CNUM_H__ #include <iostream> class CNum { private: float R; float I; public: friend std::ostream& operator <(std::ostream & out, CNum& X); friend std::istream& operator >(std::istream & in, CNum& X); CNum operator+(const CNum& B) const; CNum& operator++(); std::ostream& operator <(std::ostream & out, CNum& X) { std::out<< "("<< X.R <<"," << X.I<<")"<<"\n"; return out; } std::istream& operator >(std::istream & in, CNum& X) { std::in >> X.R >> X.I; return in; } }; #endif



LinkBack URL
About LinkBacks
perator`<'' : error in function declaration; skipping function...can anyone please explain to me why?...Thank you very much in advance and sorry to trouble you all if this is really simple:


