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.
Fork of LocalFileSystem_HelloWorld by
Revision 1:a4757252e0ae, committed 2017-06-22
- Comitter:
- LouisReynier
- Date:
- Thu Jun 22 13:03:49 2017 +0000
- Parent:
- 0:cc465aef98cf
- Commit message:
- Exemple ?criture d'un fichier sur mbed
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Feb 13 16:36:26 2013 +0000
+++ b/main.cpp Thu Jun 22 13:03:49 2017 +0000
@@ -3,7 +3,12 @@
LocalFileSystem local("local"); // Create the local filesystem under the name "local"
int main() {
- FILE *fp = fopen("/local/out.txt", "w"); // Open "out.txt" on the local file system for writing
- fprintf(fp, "Hello World!");
+ int tablo[6] = {4, 8,15, 16, 23, 46};
+ int i = 0;
+ FILE *fp = fopen("/local/compil.txt", "w"); // Open "out.txt" on the local file system for writing
+ for (i =0; i<6; i++)
+ {
+ fprintf(fp, "%d \n", tablo[i]);
+ }
fclose(fp);
}
\ No newline at end of file
