السلام عليكم
المشكله في الconstructor
bookType::bookType(string title, int noOfAuthors,
string authors[4], string publisher,
int ISBN, double price, int noOfCopies)
{
title = "";
noOfAuthors = 0;
authors[0] = "";
authors[1] = "";
authors[2] = "";
authors[3] = "";
publisher = "";
ISBN = 0;
price = 0.0;
noOfCopies = 0;
} // end constructor
تحتاج لتهيئه الخصائص بالوسائط الممره وليس بقيم افتراضيه
bookType::bookType(string title, int noOfAuthors,
string authors[4], string publisher,
int ISBN, double price, int noOfCopies)
{
this->title = title;
this->noOfAuthors = noOfAuthors;
this->authors[0] = authors[0];
this->authors[1] = authors[1];
this->authors[2] = authors[2];
this->authors[3] = authors[3];
this->publisher = publisher;
this->ISBN = ISBN;
this->price = price;
this->noOfCopies = noOfCopies;
} // end constructor