Robin Handy
/
Initialisierungsliste2
uebung2
Diff: main.cpp
- Revision:
- 2:e4ce9aad8291
- Parent:
- 1:e07846393551
--- a/main.cpp Tue Oct 13 16:33:29 2020 +0000 +++ b/main.cpp Tue Oct 13 16:42:36 2020 +0000 @@ -5,7 +5,7 @@ class MyClassA{ public: MyClassA(int x, bool wahr) : _x(x), _wahr(wahr) {} - MyClassA() : _x(), _wahr(){ //Ueberladener Konstruktor + MyClassA() : _x(), _wahr(){ _x = 10; } @@ -14,6 +14,13 @@ printf("bool ist: %d\n", _wahr); } + +void printstatus(int a){ + printf("x ist: %d\n", _x); + printf("uberladene methode ist: %d\n", _x); + + +} private: int _x; @@ -32,6 +39,8 @@ wait_ms(1000); m2.printstatus(); + wait_ms(1000); + m2.printstatus(4); } } \ No newline at end of file