C++ Expression must have pointer-to-object type
You probably meant: since c_info is an array, by doing c_info[i] you’ll access the i-th instance (object) of Employee class in c_info array, and then obtain hoursWorked through . operator. Now you can clearly see that your variant simply doesn’t make sense, as hoursWorked is just an integral type and not an array, and therefore … Read more