Louis REYNIER / Mbed 2 deprecated EcritureFichierLocal

Dependencies:   mbed

Fork of LocalFileSystem_HelloWorld by mbed official

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002  
00003 LocalFileSystem local("local");               // Create the local filesystem under the name "local"
00004  
00005 int main() {
00006     int tablo[6] = {4, 8,15, 16, 23, 46};
00007     int i = 0;
00008     FILE *fp = fopen("/local/compil.txt", "w");  // Open "out.txt" on the local file system for writing
00009     for (i =0; i<6; i++)
00010     {
00011     fprintf(fp, "%d \n", tablo[i]);
00012     }
00013     fclose(fp);
00014 }