foo.cc: In function 'bool comp(const vector3&, const vector3&)':
foo.cc:34:21: error: passing 'const vector3' as 'this' argument discards qualifiers [-fpermissive]
return a.getlength()>b.getlength();
^
foo.cc:22:6: note: in call to 'int vector3::getlength()'
int getlength()
^~~~~~~~~
foo.cc:34:35: error: passing 'const vector3' as 'this' argument discards qualifiers [-fpermissive]
return a.getlength()>b.getlength();
^
foo.cc:22:6: note: in call to 'int vector3::getlength()'
int getlength()
^~~~~~~~~
自豪的采用jd5进行评测(github.com/masnn/jd5)