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 1:7fcd3c79c65f, committed 2014-12-20
- Comitter:
- ee13b035
- Date:
- Sat Dec 20 08:08:42 2014 +0000
- Parent:
- 0:5ee238da834b
- Commit message:
- gen2
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 5ee238da834b -r 7fcd3c79c65f main.cpp --- a/main.cpp Sat Dec 20 07:53:45 2014 +0000 +++ b/main.cpp Sat Dec 20 08:08:42 2014 +0000 @@ -1,15 +1,18 @@ #include "mbed.h" - +#include "string.h" int main() { int hours = 0x12; int scnds = 0x23; - char tmp[2] ; - tmp[0] = (char)hours; - tmp[1] = '\0'; + + char h[]={hours}; + + //char tmp[2] ; + //tmp[0] = (char)hours; + //tmp[1] = '\0'; for(int i=0;i<20;i++){ - printf("%s \n",tmp);} + printf("%s \n",h);} return 0; }