I saw many posts here but none of them explains what I'm trying to do.
I have the vector vector <Car*> carVector;
and I want to pass it to a function so I can read the information of the objects in there.
The objective is to pass it and then I can use it in this cicle
for (i = 0; i < racetrack.size(); i++) {
for (int j = 1; j < nRaceTracks + 1; j++) {
if (racetrack[i]->getNome() == info[j]) {
size= racetrack[i]->getTrackSize() / 100;
for (int c = 0; c < carVector.size(); c++)
carVector[c]->chargeBattery(500);
}
}
}