2: 似乎把扩容缩容设为私有成员函数更合理些
This commit is contained in:
parent
c8cc19778e
commit
a165d1bb32
1 changed files with 3 additions and 4 deletions
7
ex2.cpp
7
ex2.cpp
|
@ -12,6 +12,9 @@ class Vec
|
||||||
int LEN;
|
int LEN;
|
||||||
int USED;
|
int USED;
|
||||||
|
|
||||||
|
void expand();
|
||||||
|
|
||||||
|
void shrink();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -34,10 +37,6 @@ class Vec
|
||||||
|
|
||||||
void swap(int a, int b);
|
void swap(int a, int b);
|
||||||
|
|
||||||
void expand();
|
|
||||||
|
|
||||||
void shrink();
|
|
||||||
|
|
||||||
int insert(int locate,int value);
|
int insert(int locate,int value);
|
||||||
|
|
||||||
int del(int locate,int value);
|
int del(int locate,int value);
|
||||||
|
|
Reference in a new issue