|
From: Noorez K. <coo...@ho...> - 2004-01-14 19:00:13
|
This is a code that should copy a .exe file. But i'm not sure what function
call to use to copy one bit at time. Can someone fill it in.
#include <iostream>
#include <cstdlib>
#include <fstream>
#include <string>
using namespace std;
int main()
{
ofstream out_file;
ifstream in_file;
cout << "Program copyer. The .exe extension will be added for you\n";
char name1[234];
cout << "Enter name of file: ";
cin.getline(name1, 234);
strcat(name1,".exe");
in_file.open(name1, ios::binary);
out_file.open("newfile.exe",ios::binary);
//code needed hear
system("pause");
}
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/photos&pgmarket=en-ca&RU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca
|