I just did so many google searches and all I found about the topic was that they showed how to copy the content of the file using fstream.
The code is here:-
//start
std::ifstream ifs("input.txt", std::ios::binary);
std::ofstream ofs("output.txt", std::ios::binary);
ofs << ifs.rdbuf();
//end
I dont know whether the code works or not I want a code to copy the file itself(like when we select a file,right click on it and select copy) and not its content which the code does.