Array of Objects As we can create array of basic data types, we can also create an array of user-defined types. An array of objects can be used to maintain details of a group of objects which are stored contiguously in memory. Syntax for creating an array of objects is as follows: ClassName array-name; For example we can create an array of objects for Student class which can be used to maintain details of a set of students. A single object in an array can be accessed using the subscript or index. Below program demonstrates the use of an array
The post What is array of objects in C++ appeared first on Coding Security.
What is array of objects in C++
read more
Tidak ada komentar:
Posting Komentar