hi everyone, how do i copy a file( or files ) on a main computer and paste it on a usb drive to be used on a different computer, all help is appreciated, thanks,
If you want a program to do that, that's no problem as long as you know the directory that the flash drive will make (F: is the drive name on my machine and probably most people's). From there, it's just a matter of using ofstream.
1 2 3 4 5 6 7
#include <fstream>
int main()
{
std::ofstream outFile;
outFile.open("F:\\Racism.txt");
}
EDIT: If you also want to copy a file, here's some simple code I found to do it:
with this I can run a program(console) from a usb drive.. I would like to know if I can put this runnable program/folder from the USB drive and copy and paste it to a computer desktop and run it that way
Why don't you try? It should just work, as long as you're going from Windows to Windows. (And if you're building a 64-bit exe, then that can't be run on a 32-bit system).
If it complains about a runtime redistributable being needed, that might need to be installed.