?? ptrdataclass.h
字號:
class pointerDataClass
{
public:
void print() const;
//Function to output the data stored in the array p.
void insertAt(int index, int num);
//Function to insert num into the array p at the
//position specified by index.
//If index is out of bounds, the program is terminated.
//If index is within bounds, but greater than the index
//of the last item in the list, num is added at the end
//of the list.
pointerDataClass(int size = 10);
//Constructor
//Creates an array of the size specified by the
//parameter size; the default array size is 10.
~pointerDataClass();
//Destructor
//deallocates the memory space occupied by the array p.
pointerDataClass (const pointerDataClass& otherObject);
//Copy constructor
private:
int maxSize; //variable to store the maximum size of p
int length; //variable to store the number elements in p
int *p; //pointer to an int array
};
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -