pointer.hpp 401 B

12345678910111213141516171819202122232425
  1. #ifndef POINTERS
  2. #define POINTERS
  3. #include "includes.hpp"
  4. using namespace std;
  5. struct Pointer
  6. {
  7. public:
  8. string tname;
  9. int start;
  10. int end; // Initialise only if tname == "array"
  11. Pointer(string tname, int start, int end = 0)
  12. {
  13. this->start = start;
  14. this->tname = tname;
  15. if (tname == "array")
  16. {
  17. this->end = end;
  18. }
  19. }
  20. };
  21. #endif