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

View File

@@ -0,0 +1,26 @@
// variables inside a class
#include<iostream>
using namespace std;
class Apple
{
public:
static int i;
Apple()
{
// Do nothing
};
};
int main()
{
Apple obj1;
Apple obj2;
obj1.i =2;
obj2.i = 3;
// prints value of i
cout << obj1.i<<" "<<obj2.i;
}