There is no C++ function for this.  The fastest way is to open the file, read it byte by byte and write it out to the new file as you go (or use a library like boost which can do this).  A slower way is just to use a system call

#include <stdlib.h>
	system("cp file.x newfile.x");