Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include <cstdio>
  2. #define N 56
  3.  
  4. class foo {
  5. public:
  6.     int bar;
  7.     virtual ~foo() {};
  8. };
  9.  
  10. int main(void) {
  11.     foo* tits=new foo[N];
  12.     for (int i=0; i<N; ++i)
  13.         tits[i].bar = i;
  14.     long n = *((long*)tits-1);
  15.     printf("%lu items\n",n);
  16.     delete[] tits;
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement