Need help about 'new' operator in C++

This question already has an answer here:

  • Why should C++ programmers minimize use of 'new'? 17 answers

  • The new operator allocates memory for the object and then invokes the constructor to initialize it. In file A you do not initialize your objects, thus passing uninitialized pointers to func , leading to the segmentation fault.

    链接地址: http://www.djcxy.com/p/40650.html

    上一篇: 将2D数组传递给C ++函数

    下一篇: 在C ++中需要关于'new'运算符的帮助