Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 0:9aebea3abcf7, committed 2018-11-15
- 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