#include <iostream.h>
#include<conio.h>
class MyClass
{
int h;
int i;
public:
MyClass(int j, int k)
{
h = j;
i = k;
}
int getlnt()
{
return i;
}
int getHeight()
{
return h;
}
};
void main()
{
MyClass myObject[3] = { MyClass(1, 2), // initialize
MyClass(3,4),
MyClass(5, 6)
};
int i;
for(i=0; i<3; i++)
{
cout << myObject[i].getHeight();
cout << ", ";
cout<< myObject[i].getlnt() << "\n";
}
getch();
}