I am having a hard time figuring out polymorphism with vectors. I keep getting random numbers which I'm guessing is the memory location. If that is the case what am I doing wrong with pointers. And here is part of my .cpp file. Thanks in advance for your help.
// part of .cpp file
int ac;
string name;
double balance;
ac = 0;
name = 'Jon';
balance = 300;
int ac1;
string name1;
double balance1;
ac1 = 1;
name1 = 'Bill';
balance1 = 200;
Info* b[2]; //Info is the name of my base class
b[0]= new sInfo(ac, name, balance); //sInfo class Inherits from Info
b[1]= new CInfo(ac1, name1, balance1); //CInfo class Inherits from Info
for (int i = 0; i < 2; i++)
{
cout << b[i]->getac() <<b[i]->getName() <<b[i]->getBalance()<<endl;
}