help
/
Info_2_TD
Diff: Partie_5/Exercice_2.cpp
- Revision:
- 0:4651c5d6ca1e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Partie_5/Exercice_2.cpp Thu Jun 25 16:30:18 2020 +0000 @@ -0,0 +1,15 @@ +/*#include "mbed.h" +Serial pc(USBTX,USBRX); +LocalFileSystem local("local"); +char read_string[64]; +int main () +{ + FILE* File1 = fopen("/local/textfile.txt","w"); // ouvre un fichier + fputs("Beaucoup de mots et de lettres...", File1) //ecrit ds le fichier +; + fclose(File1); //ferme le fichier + FILE* File2 = fopen ("/local/textfile.txt","r"); + fgets(read_string,256,File2); //lis le fichier + fclose(File2); + pc.printf("text data: %s \n",read_string); //Ecrit sur teraterm +} */ \ No newline at end of file