Мой перегруженный оператор [] не работает а работает стандартный. throw мне не нужен #include <iostream> 
#include <windows.h>
#include <string>
using namespace std;
class Customer {
private:
	int size = 0;
	Customer* customers;
	string surname;
	float priceBasicTariff;
	float priceSocialTariff;
	int countMonthsTariff;
public:
	Customer(string surname, float priceBasic, float priceSocial, int months);
	float calculateDifference();
	void printInfo();
	string getSurname() { return surname; } // геттери
	float getPriceBasicTariff() { return priceBasicTariff; }
	float getPriceSocialTariff() { return priceSocialTariff; }
	int getCountMonthsTariff() { return countMonthsTariff; }
	int getSize() { return size; }
	void setSurname(string surname) { this->surname = surname; } // сеттери
	void setPriceBasicTariff(float priceBasic) { this->priceBasicTariff = priceBasic; }
	void setPriceSocialTariff(float priceSocial) {
		this->priceSocialTariff = priceSocial;
	}
	void setSize(int size) { this->size = size; }
	void setCountMonthsTariff(int months) { this->countMonthsTariff = months; }
	void setCustomers(Customer* customers) { this->customers = customers; }
	Customer& operator() (float price, Customer customers[]) {
		for (int i = 0; i < (sizeof(customers) / sizeof(customers[0])) - 1; i++) {
			if (customers[i].priceBasicTariff == price) {
				return customers[i];
			}
		}
	}
	Customer& operator[] (int index) {
		if (index >= 0 && index < size) {
			return customers[index];
		}
		else {
			cout << "Error , index out of array";
		}
	}
};
Customer::Customer(string surname, float priceBasic, float priceSocial, int months) { // конструктор
	this->surname = surname;
	this->priceBasicTariff = priceBasic;
	this->priceSocialTariff = priceSocial;
	this->countMonthsTariff = months;
	if (months < 0 || priceBasic < 0 || priceSocial < 0) { // валидация
		cout << "Client: " << surname << ", have incorrect argument\n";
		if (months < 0) cout << "months " + to_string(months) << "\n";
		if (priceBasic < 0) cout << "priceBasic " + to_string(priceBasic) << "\n";
		if (priceSocial < 0) cout << "priceSocial " + to_string(priceSocial) << "\n";
		cout << '\n';
	}
}
float Customer::calculateDifference() {
	if (priceBasicTariff < 0 || priceSocialTariff < 0 || countMonthsTariff < 0) {
		return -1;
	}
	else {
		float totalBasic = priceBasicTariff * countMonthsTariff;
		float totalSocial = priceSocialTariff * countMonthsTariff;
		return totalBasic - totalSocial;
	}
}
void Customer::printInfo() {
	cout << "Client: " << surname << endl;
	(calculateDifference() > 0 ? cout << "Difference in price: " << calculateDifference() <<
		" uah" << endl
		: cout << "error, can't calculate difference" << endl);
}
int main() {
	system("color f8");
	Customer customers[5] = {
	Customer("Shevcenko", 250.0f, 150.0f, 12),
	Customer("Franko", 300.0f, 180.0f, 10),
	Customer("Vasilevych", 200.0f, 130.0f, 8),
	Customer("Kulish", 400.0f, 250.0f, 6),
	Customer("Panchenko", -300.0f, -150.0f, -9),
	};
	customers->setSize(sizeof(customers) / sizeof(customers[0]));
	cout << "Size of array customers: " << customers->getSize() << '\n';
	customers->setCustomers(customers);

	Customer customer("", 0.0f, 0.0f, 0);
	customer = customer(200.0, customers);
	cout << "We found client with this base price of tariff:\n";
	customer.getPriceBasicTariff(); customer.printInfo();
	for (int i = 0; i < 5; i++) {
		customers[i].printInfo(); cout << endl;
	}

	return 0;
}