M.A.F.D
16-04-2009, 13:38
الأستاذ يقول ان الخطأ في OVERLOADING FUNCTION
والمشكله رن تايم ارر
والي يجيب الحل له درجه
وأنا درجتي نازله بالإمتحان وأبغى أجمع درجات:بكاء:
LEFT]
#include <iostream>]
using namespace std;
class squar
{
private:
int *itside;
public:
squar (int a)
{
*itside=a;
}
int getside()const
{
return *itside;
}
squar operator=( const squar& rh)
{
itside=new int;
*itside=rh.getside();
return *this;
}
~squar()
{
delete itside;
}
};
int main()
{
squar a(2);
squar b(8);
a=b;
return 0;
}
[/LEFT]
والمشكله رن تايم ارر
والي يجيب الحل له درجه
وأنا درجتي نازله بالإمتحان وأبغى أجمع درجات:بكاء:
LEFT]
#include <iostream>]
using namespace std;
class squar
{
private:
int *itside;
public:
squar (int a)
{
*itside=a;
}
int getside()const
{
return *itside;
}
squar operator=( const squar& rh)
{
itside=new int;
*itside=rh.getside();
return *this;
}
~squar()
{
delete itside;
}
};
int main()
{
squar a(2);
squar b(8);
a=b;
return 0;
}
[/LEFT]