Archive 17/01/2023.

HashMap insert trouble

ToxikCoder

Hello,
I have a code

HashMap<int, WString> rus;
rus.Insert(Pair<int, WString>(LocalStringIndex::mainMenuStartButtonText, WString("??????")));

VS13 tells me, that code triggers breakpoint, I can’t understand why. It worked well with String.
Can you help me?
P.S. LocalStringIndex is enumeration

thebluefish

I’ve had issues like that in the past specific to VS2013. Deleting all breakpoints should do the trick.

ToxikCoder

Didn’t checked this. Actually, th whole problem was being unable to set russian text to Text, using code

HashMap<int, WString> rus; rus.Insert(Pair<int, WString>(LocalStringIndex::mainMenuStartButtonText, WString("??????")));
I fixed it by changing code to

HashMap<int, String> rus;
rus.Insert(Pair<int, String>(LocalStringIndex::mainMenuStartButtonText, String(L"??????")));

But thanks for help anyway:)