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.
Diff: main.cpp
- Revision:
- 2:e3ebd2ae8892
- Parent:
- 1:08ed9f1ccd06
- Child:
- 3:12ac28cf86f0
diff -r 08ed9f1ccd06 -r e3ebd2ae8892 main.cpp
--- a/main.cpp Mon Mar 03 00:32:50 2014 +0000
+++ b/main.cpp Mon Mar 03 06:27:29 2014 +0000
@@ -101,11 +101,10 @@
pc.printf("Please enter your name: ");
while (state != IDLE) { wait(0.1);}
- name.assign(inCmd, sizeof(inCmd) );
-
+ name.assign(inCmd, strlen(inCmd) );
Student s(name, id);
- pc.printf("hello %s, your id is %d\r\n", s.getName().c_str(), s.getId());
+ pc.printf("\r\nhello %s, your id is %d\r\n", s.getName().c_str(), s.getId());
printMainMenu();
while (1) {