Question: C++ How could I use a user input to create an array? Ex: int arraynumber; int i - 0; char placelist[arraynumber]; cout < < How

C++

How could I use a user input to create an array? Ex:

int arraynumber;

int i - 0;

char placelist[arraynumber];

cout << "How many restaurant are in your town?: "

cin >> arraynumber;

while (i <= arraynumber) {

cout << "Eneter restaurant names here: ";

cin >> placelist;

i++;

}

*Create a list of restaurant printed here*

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!