Data Cubes
An array can be of any data type including struct. Similarly, we can also have arrays of variables of the type class. Such variables are called arrays of objects. Class Definition: class employee { char name[30]; float age; public: void getdata(void); void putdata(void); }; The identifier employee is a user-defined data type and can be used to create objects related to different employee categories. employee manage[3]; //aray of managers employee foreman[15]; //array of foreman employee worker[75]; // array of worker the array manager contains three objects(managers), namely, manager[0], manager[1], and manager[2], of type employee class similarly, the foreman array contains 15 objects. and the worker array contains 75 objectives.(work...
Comments