Übung1

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
fatima365
Date:
Tue Oct 06 17:14:56 2020 +0000
Parent:
0:9ff9a5221e2d
Commit message:
abeli;

Changed in this revision

main1.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main1.cpp	Tue Oct 06 17:00:47 2020 +0000
+++ b/main1.cpp	Tue Oct 06 17:14:56 2020 +0000
@@ -0,0 +1,31 @@
+#include "mbed.h"
+
+
+class MyClassA {
+    
+    private:    
+    int _x;
+    bool _wahr;
+    
+    
+public:
+    MyClassA(int x, bool wahr) : _x(x), _wahr(wahr) {}
+    
+    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