CPlusPlusThings/basic_content/static/nostatic_class.cpp

22 lines
277 B
C++

#include <iostream>
using namespace std;
class Apple {
int i;
public:
Apple() {
i = 0;
cout << "Inside Constructor\n";
}
~Apple() { cout << "Inside Destructor\n"; }
};
int main() {
int x = 0;
if (x == 0) {
Apple obj;
}
cout << "End of main\n";
}