An example Analysis of static variables of delete in C++
This article will explain in detail the example analysis of delete static variables in C++. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
The pointer released by delete, and then access the example 1#include using namespace std;class Box {public: Box (int,int); ~ Box (); void volume (); static int height; int width; int length;}; Box::Box (int wi, int le) {width = wi; length = le;} Box::~Box () {cout