Stefan Hutter
/
Hutter_6_10_2020_v3
3. nur Zugewiesen bzw I2C erzeugt
main.cpp@3:ee41300c3883, 2020-10-06 (annotated)
- Committer:
- Hutzi
- Date:
- Tue Oct 06 16:39:14 2020 +0000
- Revision:
- 3:ee41300c3883
- Parent:
- 1:2a6f45577cf5
- Child:
- 4:0f310f0fa9ac
commit V2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Hutzi | 1:2a6f45577cf5 | 1 | |
Hutzi | 1:2a6f45577cf5 | 2 | |
Hutzi | 0:45192de7f4d2 | 3 | #include "mbed.h" |
Hutzi | 0:45192de7f4d2 | 4 | |
Hutzi | 1:2a6f45577cf5 | 5 | // Hutter_6.10.2020_ Aufgabe_1 |
Hutzi | 1:2a6f45577cf5 | 6 | |
Hutzi | 0:45192de7f4d2 | 7 | class TestKlasse{ |
Hutzi | 0:45192de7f4d2 | 8 | |
Hutzi | 0:45192de7f4d2 | 9 | |
Hutzi | 0:45192de7f4d2 | 10 | public: |
Hutzi | 0:45192de7f4d2 | 11 | TestKlasse(double wert) : _messwert(wert) { |
Hutzi | 0:45192de7f4d2 | 12 | |
Hutzi | 0:45192de7f4d2 | 13 | _messwert=0; |
Hutzi | 0:45192de7f4d2 | 14 | } |
Hutzi | 0:45192de7f4d2 | 15 | |
Hutzi | 0:45192de7f4d2 | 16 | void gibAus(){ |
Hutzi | 0:45192de7f4d2 | 17 | printf("Messwert ist %f\n ",_messwert); |
Hutzi | 0:45192de7f4d2 | 18 | } |
Hutzi | 0:45192de7f4d2 | 19 | |
Hutzi | 0:45192de7f4d2 | 20 | |
Hutzi | 0:45192de7f4d2 | 21 | private: |
Hutzi | 0:45192de7f4d2 | 22 | double _messwert; |
Hutzi | 0:45192de7f4d2 | 23 | }; |
Hutzi | 0:45192de7f4d2 | 24 | |
Hutzi | 0:45192de7f4d2 | 25 | TestKlasse ausgabe(15); |
Hutzi | 0:45192de7f4d2 | 26 | |
Hutzi | 0:45192de7f4d2 | 27 | int main() { |
Hutzi | 0:45192de7f4d2 | 28 | |
Hutzi | 0:45192de7f4d2 | 29 | ausgabe.gibAus(); |
Hutzi | 0:45192de7f4d2 | 30 | |
Hutzi | 0:45192de7f4d2 | 31 | } |
Hutzi | 0:45192de7f4d2 | 32 | |
Hutzi | 1:2a6f45577cf5 | 33 | |
Hutzi | 1:2a6f45577cf5 | 34 |