Advertisement
Guest User

Untitled

a guest
Aug 20th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #define a struct Cls_2 {\
  2. Cls_2(char c, double d, int i);\
  3.     char c;\
  4.     double d;\
  5.     int i;\
  6. };\
  7. char &get_c(Cls &cls) {\
  8.     return ((Cls_2 *) &cls)->c;\
  9. }\
  10. \
  11. double &get_d(Cls &cls) {\
  12.     return ((Cls_2 *) &cls)->d;\
  13. }\
  14. \
  15. int &get_i(Cls &cls) {\
  16.     return ((Cls_2 *) &cls)->i;\
  17. }
  18.  
  19. a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement