48
As other have said
on top of which
But it could be done in this way (providing that this loop intends to only read/write without actually changing the size of a vector):
for(vector<int>::size_type i=0, size = var.size(); i < size; ++i)
{
//do something
}
In the loop above you have just one call to size independently from size being inlined or not.