shalab shalab / Mbed 2 deprecated Tutorial07_ClassIntro

Dependencies:   mbed

Revision:
2:e3ebd2ae8892
Parent:
1:08ed9f1ccd06
Child:
3:12ac28cf86f0
--- 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) {