This question may already be having an answer but I felt I needed to ask it because I cant seem to get the answer I need for the code to work as intended on VS Community 2017 since it worked well on VS Express Edition.
I am trying to implement a code i picked up from a c project but I can't see how to get around the error:
Value of type "const char *" cannot be assigned to an entity of type "LPSTR"
and
cannot convert from 'const char [7]' to 'LPSTR'
MENUITEMINFO mii = { 0 };
mii.cbSize = sizeof(MENUITEMINFO);
mii.fMask = MIIM_TYPE;
mii.fType = MFT_STRING;
mii.dwTypeData = _T("item 1"); // error is on this line
mii.dwTypeData = _T("item 2"); // error is on this line also
NOTE:
- This is c code now on c++ project. It worked in VS Express Edition but cant compile on VS Community 2017
- VS Express Edition I simply changed Character set to Multi byte and it worked but on VS Community 2017 nothing seems to work and I can't see how to fix the code itself