CopyFile Function Error

Hi, I'm making a program and I keep getting an error when I use the CopyFile function.
Here is the line that gives me trouble:
CopyFile(filePath, filePath + ".bak", true);

"filePath" is a string by the way

The Error:
error C2664: 'CopyFile' : cannot convert parameter 1 from 'System::String ^' to 'LPCTSTR'
You are incorrectly mixing C++/CLI with C++. Yes, they are different things.

If you are using .Net, just stick with System::IO::File. See http://msdn.microsoft.com/en-us/library/system.io.file.aspx .
Ok, I figured it out and used this:
File::Copy(filePath, filePath + ".bak", true);

Thanks for your help, webJose
Topic archived. No new replies allowed.