
TD
exercice2.cpp@0:85af55b43299, 2016-05-02 (annotated)
- Committer:
- jomfec
- Date:
- Mon May 02 09:06:17 2016 +0000
- Revision:
- 0:85af55b43299
INFO2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jomfec | 0:85af55b43299 | 1 | /*#include "mbed.h" |
jomfec | 0:85af55b43299 | 2 | Serial pc(USBTX,USBRX); |
jomfec | 0:85af55b43299 | 3 | LocalFileSystem local("local"); |
jomfec | 0:85af55b43299 | 4 | char read_string[64]; |
jomfec | 0:85af55b43299 | 5 | int main () |
jomfec | 0:85af55b43299 | 6 | { |
jomfec | 0:85af55b43299 | 7 | FILE* File1 = fopen("/local/textfile.txt","w"); |
jomfec | 0:85af55b43299 | 8 | fputs("Beaucoup de mots et de lettres...", File1) |
jomfec | 0:85af55b43299 | 9 | ; |
jomfec | 0:85af55b43299 | 10 | fclose(File1); |
jomfec | 0:85af55b43299 | 11 | FILE* File2 = fopen ("/local/textfile.txt","r"); |
jomfec | 0:85af55b43299 | 12 | fgets(read_string,256,File2); |
jomfec | 0:85af55b43299 | 13 | fclose(File2); |
jomfec | 0:85af55b43299 | 14 | pc.printf("text data: %s \n",read_string); |
jomfec | 0:85af55b43299 | 15 | } |
jomfec | 0:85af55b43299 | 16 | */ |