This code check run application this param:
INT APIENTRY _tWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPTSTR lpCmdLine, INT iShow)
{
char* szCmdLine = lpCmdLine;
...
}
Error this lines : error C2440: 'initializing' cannot convert from 'LPTSTR' to 'char *'
Its because
LPTSTRcould beLPSTRorLPWSTRconsidening project UNICODE settings. When unicode is enabled application useLPWSTR, if notLPSTR.LPSTRis just an alias forchar*.LPWSTR-wchar_t*.TinLPTSTRmeanTCHARtype which defenition can becharorwchar_twhateverUNICODEor_UNICODEsymbol is defined in your project.LPmeans "long pointer", long is 32 bit memory address.STR- string.So lets describe
LPSTR- "long pointer to ANSI string";LPWSTR- "long pointer to wide character string" andLPTSTR- "long pointer toTCHARstring".To
WorTletter can be added prefixClikeLPCSTR,LPCTSTR,LPCWSTRwich means that these pointers are constant likeconst char*orconst wchar_t*.So your code must look like:
or