summaryrefslogtreecommitdiff
path: root/ccc/class.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ccc/class.cc')
-rw-r--r--ccc/class.cc31
1 files changed, 0 insertions, 31 deletions
diff --git a/ccc/class.cc b/ccc/class.cc
deleted file mode 100644
index b493b51..0000000
--- a/ccc/class.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <iostream>
-
-using namespace std;
-
-
-class A {
- public:
- A(int a):_a(a) {}
- int geta() {
- return _a;
- }
- static int _b;
- private:
- int _a;
-};
-
-int A::_b = 0;
-
-int main(void){
- A a(2);
- A *b = new A(2);
- cout << b->geta() << endl;
- cout << b->_b << endl;
- cout << a._b << endl;
- A::_b = 42;
- cout << b->geta() << endl;
- cout << b->_b << endl;
- cout << a._b << endl;
- return 0;
-}
-