Guest User

Untitled

a guest
Aug 16th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class a
  5. {
  6.     public:
  7.         static int i;
  8.         a();
  9.  
  10. };
  11. int a::i = 1;
  12. a::a() {cout << i++ << endl;}
  13.  
  14. void func(int i)
  15. {
  16.     a *arr = new a[i];
  17. }
  18.  
  19. int main()
  20. {
  21.     func(15);
  22.     return 0;
  23. }
Add Comment
Please, Sign In to add comment