بسم الله الرحمن الرحيم
كيف يمكننى ان انادى ال constructor فى for loop
مثال
لو عندى
class Cat
{
private:
...
...
..
public:
Cat();// defualt constructor................ (1)
Cat(int,int,float)// constructor with parameters..........(2)
.....
....
...
}
int main()
{
Cat *sisters;// creat array of Objects;
for (int i=0; i<3;i++)
{
هنا اريد ان انادى defualt constructor و constructor with parameters
كيف
}
}