What is the method to write to and read from a external text file using C/C++?
Printable View
What is the method to write to and read from a external text file using C/C++?
wat do u mean by external text file
u can read and write to a text file using CStdIOFile ( using MFC)
or simple File ( non-MFC )
hi
FILE *fp;
fp = fopen( Fname, "r");
fclose( fp );
try with fread(), fwrite() and fscanf(), fprintf()
use fopen function to open a text file. there is no connection actually. in the function fopen the path of the file can be stated.
Use C input output functions to read and write to a text file.
Have a look on this link...
[url]http://www.cs.bu.edu/teaching/c/file-io/intro/[/url]