Do exercise 7 again, but this time read into a std::string rather than to memory you put

Question:

Do exercise 7 again, but this time read into a std::string rather than to memory you put on the free store (string knows how to use the free store for you).


Data from Exercise 7

Write a program that reads characters from cin into an array that you allocate on the free store. Read individual characters until an exclamation mark (!) is entered. Do not use a std::string. Do not worry about memory exhaustion.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: