Data: we wish to allow our String class to accommodate strings of different size
ID: 3539244 • Letter: D
Question
Data: we wish to allow our String class to accommodate strings of different sizes. To that end, instead of storing a string's characters in a fixed-size array, each String object should contain the following data as part of its internal representation:
(1) a character pointer meant to point to a dynamically-allocated array of characters.
(2) a length field that will hold the current length of the string at any given moment.
Operations: same as the methods in String class - phase 2, plus the destructor, copy constructor, and assignment operator overloading.
Tell me your email address, and I send you file.
Explanation / Answer
hanny.gupta@gmail.com
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.