Answered step by step
Verified Expert Solution
Question
1 Approved Answer
hi,I have a small part of a code where I have a list of pointers to book and a list of pointer to borrowers. The
hi,I have a small part of a code where I have a list of pointers to book and a list of pointer to borrowers. The class person is an abstract class therefore we cant create object of this class only an array of pointers. The part where the arrays are initialized doesnt work (books=new Book[1000] and borrowers=new Person[200]) I tried to write *books=new Book[1000] it works but not for the borrowers because I cant create objects of that class. Also, how can I use those arrays in the next functions? No need to use the exact same program if you have a similar one I just need to understand how it works.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started