in my program
class list /// list class
{
private:
int *Data;
int Size;
num;
public:
list() // constructor
{
size = 1;
num = 0;
}
void add(); // member function
};
void list::add() ///
{
char choice;
do
{
Data = new int[size];
cout<<" \n Enter item ";
cin>>Data[num];
num++;
size++;
cout<<" Enter Y/N ";
cin>>choice;
}
while(choice == 'y');
}
and i called the function in main , its working . but here items is storing in
int *Data; // int data type...
I want to store strings . how to create a dynamic string array to store items name
( to store infinite items )
plz help me.....