I want to copy a file. I would like it so i can give the argument in command line and that would be the file name of the copied one. But when i run it with the argument, nothing happens. Also, can i set "lpCmdLine" to have a default value when no value is assigned to it? Thanks for help!



#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int iCmdShow)
{
lpCmdLine = (LPSTR)GetCommandLine();
CopyFile(L"lol.txt", (LPCWSTR)lpCmdLine, FALSE);
return 0;
}