例如:
void Func()
{
int* i = new int; // the simplest case
vector<int*> v = new vector<int*>; // another case, not sure if **new** is using correctly here
vector<int*>* vPointer = new vector<int*>;
}
void main()
{
Func();
}
因此,如果我通过使用新的运算符为函数中的局部变量分配动态内存,则>
谢谢!
例如:void Func(){int * i = new int; //最简单的情况vector
int i = 3;