Question: Suppose we have a C++ class called student. There are many ways one can create a collection student objects. Among these: one can use a

 Suppose we have a C++ class called student. There are many

Suppose we have a C++ class called student. There are many ways one can create a collection student objects. Among these: one can use a normal C++ array or an STL vector, and one could create a collection of objects, or of pointers to objects (presumably allocated on the heap.) a. Write a line of C++ code that declares an array a that can hold 10 objects of type Student b. Write a line of C++ code that declares an array b that can hold 10 pointers to objects of type student. c. Write a line of C++ code that declares an STL vector c that can hold 10 objects of type student d. Write a line of C++ code that declares an STL vector d that can hold 10 pointers to objects of type student

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!