hi all,
I do know how the array of objects work, as an example here it is:
but i'm still confused about it, how i can do if Stock class has one more class object. like this:Code:Stock *s1=new Stock[2];
char n[29];
int num;
double val;
cout<<"Enter name :";
cin>>n;
cout<<"Enter shares :";
cin>>num;
cout<<"Enter share value :";
cin>>val;
s1[0].setName(n);
s1[0].setShare(num);
s1[0].setShareVal(val);
s1[0].show();
cout<<"Enter name :";
cin>>n;
cout<<"Enter shares :";
cin>>num;
cout<<"Enter share value :";
cin>>val;
s1[1].setName(n);
s1[1].setShare(num);
s1[1].setShareVal(val);
s1[1].show();
delete[] s1;
then how do i create array of objects, including date objects and Stock objects. Please guide me through this.. would be appreciated..Code:class Stock
{
public:
Date date;
//some code
};
thanks all,

