私は次のクラスを持っています。私はcout
それを友達にしようとしてcin
いますが、エラーが発生します...誰かが私を助けてくれますか、または私が間違ったことを教えてもらえますか?
エラー:
c:\ mingw \ bin ../ lib / gcc / mingw32 / 4.6.1 / include / c ++ / bits / stl_algo.h:2215:4:エラー:'constRAngle'を'intRAngleの'this'引数として渡します: :operator <(RAngle)'は修飾子を破棄します[-fpermissive]
クラスRAngle
:
class RAngle
{
private:
int *x,*y,*l;
public:
int solution,prec;
RAngle(){
this->x = 0;
this->y = 0;
this->l = 0;
}
RAngle(int i,int j,int k){
this->x = &i;
this->y = &j;
this->l = &k;
}
friend istream& operator >>( istream& is, RAngle &ra)
{
is >> ra->x;
is >> ra->y;
is >> ra->l;
return is ;
}
}