I am confuse understanding the statement " the program must be able to read from input file and write into output file"....can anyone help me to clarify this? Thanks
This is a discussion on read from input file within the C++ Programming forums, part of the General Programming Boards category; I am confuse understanding the statement " the program must be able to read from input file and write into ...
I am confuse understanding the statement " the program must be able to read from input file and write into output file"....can anyone help me to clarify this? Thanks
If you were using the keyboard and screen
To use files, you would doCode:cin >> var; // some stuff cout << var;
Code:ifstream fin("input.txt"); ofstream fout("output.csv"); fin >> var; // some stuff fout << var;
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I support http://www.ukip.org/ as the first necessary step to a free Europe.
any examples program i can try?
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
hi
Is "ifstream" used for reading a file and "ofstream" for writing to the file?
what is "fin"?
See this link: C++ file io.
Jim