i've tried to add an element from class type to an empty dynamic array, but nothing happens, nor it changes the counter after adding one element. This is the function
void Bank::addCustomer(const Customer& newCustomer) {
Customer* temp = new Customer[getCustomerCount()+1];
for (int i = 0; i < getCustomerCount() + 1 ; ++i) {
if (getCustomerCount() != 0) {
temp[i] = customers[i];
}
}
++customerCount;
setCustomerCount(customerCount);
delete[] customers;
customers = temp;
customers[customerCount] = newCustomer;
//log
}