C++
Programming and Technical
class opOverload{
public:
bool operator==(opOverload temp);
};
bool opOverload::operator==(opOverload temp){
if(*this == temp ){
cout
Read Solution (Total 0)
C++ Other Question
#include
class fig2d
{
int dim1;
int dim2;
public:
fig2d() { dim1=5; dim2=6;}
virtual void operator
class complex{
double re;
double im;
public:
complex() : re(1),im(0.5) {}
bool operator==(complex &rhs);
operator int(){}
};
bool complex::operator == (complex &rhs){
if((this->re == rhs.re) && (this->im == rhs.im))
return true;
else
return false;
}
int main(){
complex c1;
cout