以下所有陈述均正确吗?
vector<Type> vect; //allocates vect on stack and each of the Type (using std::allocator) also will be on the stack
vector<Type> *vect = new vector<Type>; //allocates vect on heap and each of the Type will be allocated on stack
vector<Type*> vect; //vect will be on stack and Type* will be on heap.
如何Type在一个vector或任何其他STL容器中为内部分配内存?
当年话下
慕斯王
皈依舞
相关分类