Dominic Harg
/
Initialisierungslisten_Harg
Initialisierungsliste
Revision 0:85d0181f3d29, committed 2020-10-13
- Comitter:
- haunsi
- Date:
- Tue Oct 13 15:22:46 2020 +0000
- Child:
- 1:d21506e10757
- Commit message:
- Initialisierungsliste
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Oct 13 15:22:46 2020 +0000 @@ -0,0 +1,21 @@ +#include "mbed.h" + +// Initialisieren Sie in der folgeneden Klasse mittels Initialisierungsliste den _messwert mit 0 + + + +class MyClass{ +public: + MyClass() : _messwert(0) {} + + double getMesswert(){return _messwert;} +private: + double _messwert; +}; + +MyClass messi; + +int main() +{ + printf("Der Messwert beträgt: %f\n", messi.getMesswert); +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Oct 13 15:22:46 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file