Array of Object in C++

As we know array is a collection of similar data elements. We can also create array of object.

Que. WAP to create a array of object. initialize and display the content of array.

  OR  WAP  to create a class player and take a details from user name, age and print. Also use  array of object.

Output

Note: In the above program we have creates three object “player[3]”.