Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class PointList {
- public:
- int len;
- int list[16][2];
- PointList() {
- len = 0;
- }
- void add(int point[]) {
- list[len][0] = point[0];
- list[len][1] = point[1];
- len++;
- }
- void rem(int index) {
- for (int i = index; i < len-1; i++) {
- list[i][0] = list[i+1][0];
- list[i][1] = list[i+1][1];
- }
- list[len-1][0] = 0;
- list[len-1][1] = 0;
- len--;
- }
- };
Add Comment
Please, Sign In to add comment