Maida Ahmic
/
membervariablen
Membervariablen _x und _wahr
Diff: main.cpp
- Revision:
- 0:29763d20094c
diff -r 000000000000 -r 29763d20094c main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Oct 06 17:20:35 2020 +0000 @@ -0,0 +1,26 @@ + +#include "mbed.h" +#include "platform/mbed_thread.h" +class MyClassA { + private: + int _x; + bool _wahr; +public: + MyClassA(int x, bool wahr) : _x(1), _wahr(true) {} + int getx(void) + { + return _x; + + } + bool getwahr(void) + { + return _wahr; + } +}; +MyClassA myclassa (0,0) ; + +int main() +{ + printf("%d\n", myclassa.getx()); + printf("%d\n", myclassa.getwahr()); +} \ No newline at end of file