Advertisement
Guest User

Untitled

a guest
Dec 5th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include<iostream>
  2. #include<fstream>
  3. using namespace std;
  4.  
  5. int main(){
  6. fstream f;
  7. fstream g;
  8. f.open("hello.exe",ios::in|ios::binary);
  9. g.open("copy_hello.exe",ios::out|ios::binary);
  10. char *buffer=new char;;
  11. while(!f.eof()){
  12. f.read(buffer,sizeof(char));
  13. g.write(buffer,sizeof(char));
  14. }
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement