I have this Book class objects (base class: Product)
Book books[5] = {
Book("Kucuk Prens","FR","Roman","Book",10,15,103061,12,"Kultur yayinlari",10),
Book("Kucuk Prens1","FR","Roman","Book",10,15,103061,12,"Kultur yayinlari",10),
Book("Kucuk Prens2","FR","Roman","Book",10,15,103061,12,"Kultur yayinlari",10),
Book("Kucuk Prens3","FR","Roman","Book",10,15,103061,12,"Kultur yayinlari",10),
Book("Kucuk Prens4","FR","Roman","Book",10,15,103061,12,"Kultur yayinlari",10)};
And I have a Cart class.
class Cart
{
private:
int totalPrice;
Product productList[5]; // kullanıcın seçtiği
public:
};
For instance, I want to add books[1] to productList[]. How can I?