Hi guys!!
Im getting an error in this function:
1 2 3 4 5 6 7 8 9 10 11 12
|
class complex{
private:
float real,imagin;
public:
...
friend istream& operator>>(istream &is, const complex &c);
};
istream& operator>>(istream &is, const complex &c){
is>>c.imagin; //error line
return is;
}
|
no match for 'operator>>' in 'is >> c->complex::imagin' |
I really cant see the problem, i hope you guys can help me, thanks :)
Last edited on
c is const but you're trying to modify it
Last edited on