Today's Question:  What's your opinion about Alibaba mooncake incident?        GIVE A SHOUT


Share your geeky stuff now.
You make the world better, the world makes us better.



  new expression vs operator new in C++

In C++, there is a new mechanism for memory allocation and management. When we want to initialize an object, we can use new expression to get enough memory for storing an object and also initialize the object. When we want to create a new object, we can use new expression, for example: Obj *obj=new Obj; Basically, what the new expression does is to allocate enough memory for storing the obj object, in addition, it will initialize the object with some intial values. Also, there is an operator new...

2,584 0 0          C++ NEW EXPRESSION OPERATOR NEW