update dir

This commit is contained in:
light-city
2019-07-14 20:39:17 +08:00
parent 57627e0b75
commit fdf8d8eacb
8 changed files with 397 additions and 0 deletions

28
static/static_class.cpp Normal file
View File

@@ -0,0 +1,28 @@
#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)
{
static Apple obj;
}
cout << "End of main\n";
}