Read/write file help
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
Gday everyone, Please help me. How to read and write a pointer of character to a file in C? Thanks in advance. Eric
eric
You don't write the pointer to a file. You write the data which the pointer points to.
char* string = ...;
FILE* pStream = fopen("file", "w");
fwrite(string, 1, strlen(string), pStream);-- Mit viel Oktan und frei von Blei, eine Kraftstoff wie Benziiiiiiin!