uebung2

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
rob117
Date:
Tue Oct 13 16:42:36 2020 +0000
Parent:
1:e07846393551
Commit message:
uberladenen methode

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r e07846393551 -r e4ce9aad8291 main.cpp
--- a/main.cpp	Tue Oct 13 16:33:29 2020 +0000
+++ b/main.cpp	Tue Oct 13 16:42:36 2020 +0000
@@ -5,7 +5,7 @@
 class MyClassA{
 public:
     MyClassA(int x, bool wahr) : _x(x), _wahr(wahr)  {}
-    MyClassA() : _x(), _wahr(){     //Ueberladener Konstruktor
+    MyClassA() : _x(), _wahr(){
         _x = 10;
     }
     
@@ -14,6 +14,13 @@
     printf("bool ist: %d\n", _wahr);
     
 }
+
+void printstatus(int a){
+    printf("x ist: %d\n", _x);
+    printf("uberladene methode ist: %d\n", _x);
+   
+    
+}
     
 private:    
     int _x;
@@ -32,6 +39,8 @@
     
     wait_ms(1000);
     m2.printstatus();
+        wait_ms(1000);
+    m2.printstatus(4);
    
 }
 }
\ No newline at end of file