error - cannot convert parameter 3 from 'char [1024]' to 'wchar_t *'
-
problem piece of code - if(Function(parm1, parm2, parm3)==0){ error - cannot convert parameter 3 from 'char [1024]' to 'wchar_t *' parm3 is an array - //char parm3[Buffsize1024]; //was before wchar_t parm3[Buffsize1024]; // I changed to make the application unicode enabled Function is expecting wchar_t but its getting char[1024] from some where. I also changed the function signature to accept wchar_t type in header file. objective is to make the whole code UNICODE enabled. I have added all the tchar.h, wchar.h fiels param 3 has been defined (modified) as wchar_t in all the connected files too. I also tried to cast the string and pass the casted string. CString s(parm3) LPCTSTR p = s; no change in the error. I cant debug yet. Pls help how can I get rid of this error.
-
problem piece of code - if(Function(parm1, parm2, parm3)==0){ error - cannot convert parameter 3 from 'char [1024]' to 'wchar_t *' parm3 is an array - //char parm3[Buffsize1024]; //was before wchar_t parm3[Buffsize1024]; // I changed to make the application unicode enabled Function is expecting wchar_t but its getting char[1024] from some where. I also changed the function signature to accept wchar_t type in header file. objective is to make the whole code UNICODE enabled. I have added all the tchar.h, wchar.h fiels param 3 has been defined (modified) as wchar_t in all the connected files too. I also tried to cast the string and pass the casted string. CString s(parm3) LPCTSTR p = s; no change in the error. I cant debug yet. Pls help how can I get rid of this error.
Something in your code has not been converted correctly. Go to the source code and look carefully at the line where the error occurs. Also please use <pre> tags around your code so it is more readable, like:
wchar_t parm3[Buffsize1024];
if(Function(parm1, parm2, parm3)==0){
// ... -
problem piece of code - if(Function(parm1, parm2, parm3)==0){ error - cannot convert parameter 3 from 'char [1024]' to 'wchar_t *' parm3 is an array - //char parm3[Buffsize1024]; //was before wchar_t parm3[Buffsize1024]; // I changed to make the application unicode enabled Function is expecting wchar_t but its getting char[1024] from some where. I also changed the function signature to accept wchar_t type in header file. objective is to make the whole code UNICODE enabled. I have added all the tchar.h, wchar.h fiels param 3 has been defined (modified) as wchar_t in all the connected files too. I also tried to cast the string and pass the casted string. CString s(parm3) LPCTSTR p = s; no change in the error. I cant debug yet. Pls help how can I get rid of this error.
Have you tried Project properties->Configuration properties->Char set->Unicode