Hi every body how are you? I'm trying to write a program in C++ that does the following: scans a folder for files, selects one of these files at random, copies the selected file to a prespecified folder, then renames this file to a another predifined name. So far I've the part that scans the folder selects a random file, I need help in copying this selected file to a another folder. Can any one please help? It will be greatly appreciated.
So far I have the following code:
using namespace std;
cout<<"No *.txt file"<<endl;
if(rand()%3==0)//1 case out of 3
cout<<"I selected "<<file_found<<endl;