C++ Programming and Technical

Determine the output of the 'C++' Codelet.
class base
{
public :
out()
{
cout

Read Solution (Total 0)

C++ Other Question

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
Justify the use of virtual constructors and destructors in C++.