Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class a
- {
- public:
- static int i;
- a();
- };
- int a::i = 1;
- a::a() {cout << i++ << endl;}
- void func(int i)
- {
- a *arr = new a[i];
- }
- int main()
- {
- func(15);
- return 0;
- }
Add Comment
Please, Sign In to add comment