Kiri3L

my_vector.h

Nov 21st, 2019
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. //
  2. // Created by k3l on 21.11.2019.
  3. //
  4.  
  5. #ifndef VECTOR_MY_VECTOR_H
  6. #define VECTOR_MY_VECTOR_H
  7.  
  8. namespace my_std{
  9.  
  10. class my_vector {
  11. int size;
  12. int alloc;
  13. int *array;
  14. public:
  15. my_vector();
  16. my_vector(int n);
  17. my_vector(int n, int x);
  18. void push_back(int i);
  19. void resize(int new_size);
  20. int pop();
  21. int get_size();
  22. int& operator[](int index);
  23. ~my_vector();
  24. };
  25. }
  26.  
  27.  
  28.  
  29. #endif //VECTOR_MY_VECTOR_H
Advertisement
Add Comment
Please, Sign In to add comment