Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- classes.hpp
- class Rectangle : public Figure
- {
- private:
- int size;
- public:
- int get(int a, b);
- }
- class Circle : public Figure
- {
- private:
- int size;
- public:
- int get(int a, b);
- }
- class Figure
- {
- public:
- virtual int get();
- }
- ........
- main.cpp
- int figures[10];
- void save(int addr, Figure *dev_m) {
- int64_t tempAddr = (int64_t)(int*)figure_m;
- figures[addr] = tempAddr;
- }
- //далее, я уже работаю с сохраненными указателями так:
- Figure* figure_m = reinterpret_cast<Figure*>(figures[addr]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement