I have the following code :
我有以下代码:
class FLOAT
{
float *num;
public:
FLOAT(){}
FLOAT(float f)
{
num = new float(f);
}
FLOAT operator +(FLOAT& obj)
{
FLOAT temp;
temp.num = new float;
temp.num = *num + obj.getF();
return temp;
}
float getF(){ return *num; }
void showF(){ cout << "num : "<< *num << endl; }
};
class