I bought a Surface Go 2 today, and installed Visual Studio 2019. I loaded my project, that successfully compiled on my previous PC, also in VS19.
The first problem that I noticed is that the VS editor displays Unicode characters (Cyrillic) in my .cpp
files as hieroglyphs:
card->NewTextW(L"Çàãðóçêà", ...
Instead of:
card->NewTextW(L"Загрузка",
Then I tried to compile the project, but got more then a hundred errors, and all of them were about the compiler can't convert from const wchar/char *
to wchar/char *
, although, I repeat, that earlier, in another PC, everything compiled successfully. This error appears to almost all types of strings, and for strings with wrong encoding, like mentioned above, and without.
Specific example of error
card->NewTextW(L"Çàãðóçêà", 3, r.right/2-50, r.bottom / 2 - 350 / 2 - 80 + 350 + 60, 10, 20, RGB(0, 0, 0));
card->NewText("eng-string", 4, r.right/2-50, r.bottom / 2 - 350 / 2 - 80 + 350 + 60, 10, 20, RGB(0, 0, 0));
Where card
is a pointer to an object of interface virtual class ICard
:
class ICard
{
public:
...
virtual void NewTextW(wchar_t *text, int id, int x, int y, int divid, int j, COLORREF col) = 0;
virtual void NewText(char *text, int id, int x, int y, int divid, int j, COLORREF col) = 0;
...
}card*;
Specific example of no error
MessageBoxA(NULL, "aga", "uogou", MB_OK);