Christian Weiß / Mbed 2 deprecated TINF_Objektorientiert

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Wizo
Date:
Thu Nov 15 18:08:56 2018 +0000
Commit message:
TINF_Objektorientiert

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	Thu Nov 15 18:08:56 2018 +0000
@@ -0,0 +1,47 @@
+#include <stdio.h>
+
+class Beva 
+{
+public:
+//Inlinemethode; Methodendefinition in der Klasse
+    void eingabe()
+    {
+    scanf("%i", &zahl1);
+    scanf("%i", &zahl2);
+    }
+    
+//Nur Funktionsprototyping; Methodendefinition ausserhalb der Klasse    
+    void ausgabe();
+    
+
+private:
+
+    int zahl1;
+    int zahl2;
+    
+};
+
+//Funktionsprototyping
+
+
+
+//Klasse instanziieren
+Beva mein;
+
+int main() {
+    
+    //Methodenaufruf
+    mein.eingabe();
+    mein.ausgabe();
+    //eingabe (str);
+    //ausgabe(str);
+    
+    return 0;
+}
+
+//Methodendefintion
+
+void Beva::ausgabe()
+    {
+    printf("Hello Bulme: %i \n", zahl1 + zahl2);    
+    }
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Nov 15 18:08:56 2018 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/5aab5a7997ee
\ No newline at end of file