class Skladiste
{
double max;
int n;
Element** niz;
public:
Skladiste(double max, int n);
~Skladiste();
void addElement(Element& e);
double kolicina();
void printCodes();
friend ostream& operator<<(ostream& izlaz, Skladiste& s);
Element* operator[](int n);
};
void Skladiste::addElement(Element& e)
{
int m;
n=m;
if(this->kolicina()+e.vratiKolicinu()<max)
{
niz[m]=e;
m++;
}
this->n=m;
}
This method is where I have problem. I need to assign to niz an element e in the last place n. The Element is an abstract class so I cannot make objects of that type. I'm beginner so I would appreciate any help :)