shubham c
/
File_handling
n
main.cpp@0:14179e8daf60, 2014-07-04 (annotated)
- Committer:
- ee12b079
- Date:
- Fri Jul 04 18:59:28 2014 +0000
- Revision:
- 0:14179e8daf60
n
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ee12b079 | 0:14179e8daf60 | 1 | |
ee12b079 | 0:14179e8daf60 | 2 | #include "mbed.h" |
ee12b079 | 0:14179e8daf60 | 3 | |
ee12b079 | 0:14179e8daf60 | 4 | LocalFileSystem local("local"); // Create the local filesystem under the name "local" |
ee12b079 | 0:14179e8daf60 | 5 | |
ee12b079 | 0:14179e8daf60 | 6 | int main() { |
ee12b079 | 0:14179e8daf60 | 7 | FILE *fp = fopen("/local/out.txt", "w"); // Open "out.txt" on the local file system for writing |
ee12b079 | 0:14179e8daf60 | 8 | fprintf(fp, "Hello World!"); |
ee12b079 | 0:14179e8daf60 | 9 | fclose(fp); |
ee12b079 | 0:14179e8daf60 | 10 | } |