Hi mates :)
recently I did this code:
#include <iostream>
#include <windows.h>
#include <string>
using namespace std;
int main()
{
int check = 1;
string dir;
string dir2;
string name;
cout << "Which directory is the file located?\n";
getline(cin, dir);
cout << "\nWhere you wanna move it to which directory?\n";
getline(cin, dir2);
while( check == 1 )
{
cout << "\nEnter the name of the file: ";
getline(cin, name);
CopyFile(dir + name , dir2 + name, false);
cout << "Do you want to copy a file again? 1 if yes, otherwise, no: ";
cin >> check;
}
return 0;
}
How to fix the problem, please?
Thanks :)