code_junkie

system() copy fails, while cmd copy works

Nov 11th, 2011
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. system("copy c:hello.txt c:hello2.txt");
  8. system("pause");
  9.  
  10. return 0;
  11. }
  12.  
  13. system("copy c:\hello.txt c:\hello2.txt");
  14.  
  15. FILE *fh = fopen ("c:text.dat", "w");
  16.  
  17. system("copy c:/hello.txt c:/hello2.txt");
Add Comment
Please, Sign In to add comment