Which Keyword Can Be Used For Overloading?

Answer

 

Operator keyword.

Example-

 

 

classCPoint3D

{

public:

double x, y, z;

CPoint3D(double dX =0.0,double dY =0.0,double dZ =0.0): x(dX), y(dY), z(dZ){}

CPoint3Doperator+(constCPoint3D& point)const;

CPoint3Doperator-(constCPoint3D& point)const;

CPoint3Doperator*(double dFactor)const;

CPoint3Doperator/(double dFactor)const;

};

 

All c++ Questions

Ask your interview questions on c

Write Your comment or Questions if you want the answers on c from c Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---