Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - There is a problem with the memory release of C++ char* type new.
There is a problem with the memory release of C++ char* type new.
Delete [] q; //Publish the original text

Delete [] p; //Release gifts'

Remember: after the memory is released, you can't use this memory. It is best to assign the pointer variable to null after the memory is released.

Delete [] q;

q = NULL

C++ is an object-oriented programming language developed on the basis of C language, which is widely used. C++ supports various programming paradigms-object-oriented programming, generic programming and procedural programming. The latest official standard C++ 14 was released on August 20 14 18. Its programming field is wide, and it is often used in system development, engine development and other application fields. It is one of the most popular and powerful programming languages by far, and supports features such as classes, encapsulation and overloading!