My system pause function in this program is not read at the end of the
program so i can't
see the results.
// This program copies the contents of one file
// to another file.
// Program file: copyfile.cpp
#include <iostream>
#include <fstream>
#include <cstdlib>
using namespace std;
int main()
{
ifstream in_file;
char ch;
in_file.open("myfile.txt");
in_file.get(ch);
while (! in_file.eof() && ! in_file.fail())
{
cout << ch;
in_file.get(ch);
}
in_file.close();
system("pause");
}
_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=dept/features&pgmarket=en-ca&RU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca
|