Note 1: I'm not attempting to make a malicious program, the pathes chosen are just simple examples for testing.
Note 2: Files that are to be copied are executable files so the "weird" characters should be stored in variables large enough to be pasted fine.
Note 3: I'm talking about the run-time, not the time needed to write the code.
I tried using ifstream and ofstream but I had to change the destination variable name every time I want to paste the file somewhere so I don't think it's a good way to do it.
you asked what is a good way of doing it.
i would just write a simple batch script if you just want to transfer 4 files.
you can always pass parameters to your executable so when you run it you just specify the directories of where you want the file transferred.
so you don't need to keep recompiling your code every time your directory changes.
Are you serious? I asked for the fastest way to copy a file. Batch files are not even compiled, the simple command of xcopy C:\Test\copyMe.e F:\My Music\myNewName.exe /... would first, call the command interpreter to check if the line is valid, then call xcopy.exe with arguments specified which will also check if th syntax is valid before copying files. Also, to do this in a batch file you should write xcopy 4 times (for every destinations), so the source file will be reloaded every time. This is the slowest way of doing it.
I'm not insulting anybody, he answered the worst idea I could expect. I'd rather not use a third party library for such a simple script. Thanks for your suggestions anyway, I'll keep waiting for others.
@SkyWAGz
In case you are wondering, I reported you.
rafae11 gave you a valid solution to your problem and even if he hadn't the insults where unnecessary.