给定
std::vector<CMyClass> objects;
CMyClass list[MAX_OBJECT_COUNT];
这样做是否明智?
for(unsigned int i = 0; i < objects.size(); list[i] = objects.at(i++));
或者我应该将我的循环扩展到这个?
for(unsigned int i = 0; i < objects.size(); i++)
{
list[i] = objects.at(i);
}