May 2012
Intermediate to advanced
679 pages
16h 56m
English
We have seen an array of basic data type as well as structures. We can have array of objects too. Every element of the array will be an object of a given class. We can use it like any other object. Most of the large programs need an array of objects. Databases depend heavily on arrays of data. When data itself is an object, an array of object becomes the most important data structure.
The critical part here is initialization of objects. Let us study it step by step.
Problem: Write a program to study an array of objects without pointers.
Solution: We will first define class Student. Then we will create an array of objects of class student. See Program 6.11.
Read now
Unlock full access