I converted a narrow string to the wide string as follows :
string nameOfPrinter;
getline( cin , nameOfPrinter );
wstring WprinterName;
int number = MultiByteToWideChar( CP_UTF8 , 0 , nameOfPrinter.c_str() , nameOfPrinter.size() , &WprinterName , 0 );
// then i make a call to the function whose prototype is callToPrint( LPTSTR , LPVOID , DWORD , string )
// the calling statement is :
callToPrint( WprinterName , -----all other arguments-----,);
// But this call produces the following error error C2664: 'callToPrint' : cannot convert parameter 1 from 'std::wstring' to 'LPTSTR'
Why is it so ? and please tell me how can i fix it ?