Hi
i want to make a small program that read and write to a file, so i want to know the commands that used to read and write to a file.
with many thanks
#include <iostream.h>
#include <fstream.h>
int main() {
ifstream myInput("somefile.txt");
char inp;
while (myInput >> inp) {
cout << inp;
}
return 0;
}
For example. ifstream objects also have a few other methods, such as readline().