CPlusPlusThings/basic_content/static/nostatic_class.cpp
Light-City 8edbbbc5a2 update
2019-11-05 16:56:07 +08:00

29 lines
355 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";
}