Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<fstream>
- using namespace std;
- int main(){
- fstream f;
- fstream g;
- f.open("hello.exe",ios::in|ios::binary);
- g.open("copy_hello.exe",ios::out|ios::binary);
- char *buffer=new char;;
- while(!f.eof()){
- f.read(buffer,sizeof(char));
- g.write(buffer,sizeof(char));
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement