The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 399 Weeks Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
I need help with the following problems C++. Please try to make the code as simple as possible and answers every questions. Thank you.
Pointers
Modify the class by adding a private int pointer that will be used as an array. Create another overloaded constructor that takes an int pointer and int size as parameters. The constructor allocates the pointer to be an array based on the parameter size (if the size is greater than 0.) and the array parameter is copied to the pointer ( a loop is a must to copy one element at a time). Then it calls a private member function of the class that displays array elements. Come up with that private member function. Where should you delete the pointer? The main( ) should have an array that is passed to the overloaded constructor when an object is instantiated.
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll