please see the
forum rules.
Well the word "transfer" makes your question rather ambiguous. If you mean to copy a file there are a number of ways.
The basic procedure is to open a file for reading (binary) and one for output (again binary) and then loop though copying blocks from the in file to the out file. STL even has a
copy function that can take the contents of the source file and copy it to a destination.
many people who are new to C/C++ like to use the system() function to just call the operating system's copy command. It may not be the most portable but a little batch file or shell script to wrap the operating system's command name and it can be made portable.
system("copy source dest"); //Windows/DOS
system("cp source dest"); //Linux/Unix
If by "transfer a file" you mean upload/download across a network or internet, well that is a different story (or even a couple of different stories).