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 2:4ceb0547f2cf, committed 2020-10-06
- Comitter:
- happy_alien
- Date:
- Tue Oct 06 16:30:54 2020 +0000
- Parent:
- 1:211adb1a2b53
- Commit message:
- exercise 2
Changed in this revision
| main2.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main2.cpp Tue Oct 06 16:30:54 2020 +0000
@@ -0,0 +1,53 @@
+#include "mbed.h"
+
+void printStatus(void);
+
+class MyClassA
+{
+public:
+ MyClassA(int x, bool wahr): _x(x),_wahr(wahr) {}
+
+
+
+
+
+ void printStatus()
+ {
+ printf("Status is now: %d,%d\n", _x,_wahr);
+ }
+ int getx(void)
+ {
+ return _x;
+ }
+private:
+ int _x;
+ bool _wahr;
+};
+
+MyClassA messwert(15,1);
+
+
+
+
+int main()
+{
+ while (1) {
+
+ messwert.printStatus();
+ wait_ms(500);
+
+
+ }
+}
+
+
+int main()
+{
+ while (1) {
+
+ messwert.printStatus();
+ wait_ms(500);
+
+
+ }
+}