staic专题

C++初始化列表,staic成员变量

初始化列表的引入  class Stack{public:Stack(int capacity){_arr = (int*)malloc(sizeof(int) * capacity);if (_arr == NULL){perror("malloc->_newarr");return;}_capacity = capacity;}private:int _capacity;int _si