Write a copy assignment operator for carcounter that assigns objtocopy.carcount to the new objects's carcount, then returns *this. sample output for the given program:cars counted: 12

Respuesta :

W0lf93
Answer: int main() { CarCounter frontParkingLot; CarCounter backParkingLot; frontParkingLot.SetCarCount(12); backParkingLot = frontParkingLot; cout << "Cars counted: " << backParkingLot.GetCarCount(); return 0; }