+ 1
Is it possible to use ios::app in C?
I need it for file handling, and my friend told me he used ios::app in C++ but he's not sure if C supports ios::app. And when I Google searched on it, all the information given are based on C++, just wondering if anyone could help here. Thanks!
2 Answers
+ 11
Maybe not, you can try using C own file opening modes.
Here they are
Ā¹https://www.tutorialspoint.com/c_standard_library/c_function_fopen.htm
Ā²https://www.programiz.com/c-programming/c-file-input-output
Ā³https://www.codesdope.com/c-enjoy-with-files/
0
As far as I remember in C also there is 'fopen' function for operations read/write file. Try that:
mf=fopen (āmyfile/test.txtā,āwā);
fprintf (mf,ātestā);
fclose (mf);