pelegk
May 1st, 2003, 05:43 AM
i wanted to do this :
class vector3d {
private :
int x,y,z;
public :
int operator==(vector3d,vector3d);
friend int operator==(vector3d,float);
friend int operator==(float,vector3d);
};
after this declareration i have made the 3 functions,
but when i try to do :
vector3d v1,v2;
float f1=10;
cout << f1==v2;
i get an error!
why?
thnaks in advance
peleg
class vector3d {
private :
int x,y,z;
public :
int operator==(vector3d,vector3d);
friend int operator==(vector3d,float);
friend int operator==(float,vector3d);
};
after this declareration i have made the 3 functions,
but when i try to do :
vector3d v1,v2;
float f1=10;
cout << f1==v2;
i get an error!
why?
thnaks in advance
peleg