Open
Description
When I compiled the program this happened, please tell me what to do.
$ g++ -std=gnu++17 -o game CommandLineFPS.cpp
CommandLineFPS.cpp: In function 'int main()':
CommandLineFPS.cpp:267:114: error: 'swprintf_s' was not declared in this scope
swprintf_s(screen, 40, L"X=%3.2f, Y=%3.2f, A=%3.2f FPS=%3.2f ", fPlayerX, fPlayerY, fPlayerA, 1.0f/fElapsedTime);
^
CommandLineFPS.cpp:279:103: error: cannot convert 'wchar_t*' to 'LPCSTR {aka const char*}' for argument '2' to 'BOOL WriteConsoleOutputCharacterA(HANDLE, LPCSTR, DWORD, COORD, PDWORD)'
WriteConsoleOutputCharacter(hConsole, screen, nScreenWidth * nScreenHeight, { 0,0 }, &dwBytesWritten);
^
Metadata
Metadata
Assignees
Labels
No labels