Initialisierungslisten Uebung 1

Dependencies:   mbed

Committer:
Mr_Anderssson
Date:
Tue Oct 06 17:24:53 2020 +0000
Revision:
1:5f898b1088f7
Child:
2:32751b274adb
Uebung 3

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Mr_Anderssson 1:5f898b1088f7 1
Mr_Anderssson 1:5f898b1088f7 2 //Initialisieren Sie in der folgenden Klasse mittel Initialisierungsliste
Mr_Anderssson 1:5f898b1088f7 3 //die Membervariablen _x und _wahr:
Mr_Anderssson 1:5f898b1088f7 4
Mr_Anderssson 1:5f898b1088f7 5 #include "mbed.h"
Mr_Anderssson 1:5f898b1088f7 6
Mr_Anderssson 1:5f898b1088f7 7 class MyClassA {
Mr_Anderssson 1:5f898b1088f7 8
Mr_Anderssson 1:5f898b1088f7 9 public:
Mr_Anderssson 1:5f898b1088f7 10 MyClassA(int x, bool wahr) {}
Mr_Anderssson 1:5f898b1088f7 11 int getx(void) {return _x;}
Mr_Anderssson 1:5f898b1088f7 12 private:
Mr_Anderssson 1:5f898b1088f7 13 int _x;
Mr_Anderssson 1:5f898b1088f7 14 bool _wahr;};