I use Visual Studio 2013 and I get the following error:
error C2664: 'DWORD Options(int,LPCTSTR *,LPCTSTR,...)' : cannot convert argument 2 from 'LPTSTR []' to 'LPCTSTR *' 54 1 ConsoleApplication3
This is the code:
DWORD Options(int argc, LPCTSTR argv[], LPCTSTR OptStr, ...){
// Code
}
int _tmain(int argc, LPTSTR argv[]){
iFirstFile = Options(argc, argv, _T("s"), &dashS, NULL);
// Code
}
Does anyone know how to fix it?
And explain why this error does occur?
Options(argc, const_cast<LPCTSTR*>(argv), _T("s"), &dashS, NULL);- RbMmconst_castto add aconstqualifier? - IInspectable