I am trying to create a class that adds one to the variable "number_of_accounts_created" each time an object is created. However, this value is being set at 1000 when the first object is created. I am assuming this is because 1000 objects are being created which corresponds with the variable "MAX".
Any ideas how I can fix this? Please keep it simple as I am still new to this.
on line 69 you create and array of Customer with MAX elements. For each element of that array the default constructor is called and number_of_accounts_created is incremented. as long as you use an array this will continue to happen. I would use a vector instead and create customer objects as needed or you could use a dynamic array but that's a pain.