- 1
- 2
- 3
- 4
- 5
- 6
- 7
string input;
string output;
input = "C:\\bla.txt\\"; //"Bla.txt" is the file to copy
output = "C:\\test\\"; //"Test" is the folder to copy to
system("copy input.c_str() output.c_str()")
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+29
string input;
string output;
input = "C:\\bla.txt\\"; //"Bla.txt" is the file to copy
output = "C:\\test\\"; //"Test" is the folder to copy to
system("copy input.c_str() output.c_str()")
http://cboard.cprogramming.com/cplusplus-programming/109047-help-copy-files-cplusplus.html
It means to insert a string or replace a variable with its value.
string $output;
$input = "C:\\bla.txt\\"; //"Bla.txt" is the file to copy
$output = "C:\\test\\"; //"Test" is the folder to copy to
system("copy $input.c_str() $output.c_str()")