Michael Planner
/
InitListen
Codeschnippseln für diese Übung
class1.cpp@1:c65875995efb, 2020-10-13 (annotated)
- Committer:
- Aagrus
- Date:
- Tue Oct 13 16:34:21 2020 +0000
- Revision:
- 1:c65875995efb
- Parent:
- 0:76d9c940a794
UPDATE: Hinzugefuegt -> Ueberladener Konstruktor
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Aagrus | 0:76d9c940a794 | 1 | class MyClass |
Aagrus | 0:76d9c940a794 | 2 | { |
Aagrus | 0:76d9c940a794 | 3 | private: |
Aagrus | 0:76d9c940a794 | 4 | double _messwert; |
Aagrus | 0:76d9c940a794 | 5 | |
Aagrus | 0:76d9c940a794 | 6 | public: |
Aagrus | 0:76d9c940a794 | 7 | MyClass() : _messwert(0) |
Aagrus | 0:76d9c940a794 | 8 | { |
Aagrus | 0:76d9c940a794 | 9 | //_messwert = 0; |
Aagrus | 0:76d9c940a794 | 10 | } |
Aagrus | 1:c65875995efb | 11 | MyClass(double messwert) : _messwert(messwert) |
Aagrus | 1:c65875995efb | 12 | { |
Aagrus | 1:c65875995efb | 13 | |
Aagrus | 1:c65875995efb | 14 | } |
Aagrus | 1:c65875995efb | 15 | |
Aagrus | 1:c65875995efb | 16 | |
Aagrus | 1:c65875995efb | 17 | int GetMesswert() |
Aagrus | 1:c65875995efb | 18 | { |
Aagrus | 1:c65875995efb | 19 | return _messwert; |
Aagrus | 1:c65875995efb | 20 | } |
Aagrus | 0:76d9c940a794 | 21 | }; |