Hey Guys I have a simple question on this. Now all I can do is editing the class only , the main function need to remain and any solution for this??? Thanks!!!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <iostream>
usingnamespace std;
class AA {
int x;
public:
AA(int x);
int getX(){return x;}
};
int main(){
cout << AA::getX() <<endl;
AA* a = new AA[100];
cout << AA::getX() <<endl;
delete []a;
cout << AA::getX() <<endl;
}