Can I use a reference variable for c (e.g., Customer &c) instead? If so how? And is this preferable to using a pointer variable?
for(std::vector<Customer*>::const_iterator it = customers_.begin();
it != customers_.end() ; it ++)
{
Customer *c = (*it);
c->PrintName();
...
}
Yes:
(The parentheses aren’t necessary, but may make it clearer.)