an array and set all the values to 0, I get an error?
Code:
wchar_t* screen = new wchar_t[screenWidth * screenHeight];
ZeroMemory(&screen, screenWidth * screenHeight * sizeof(wchar_t));
Error: error C4789: buffer 'screen' of size 4 bytes will be overrun; 4500 bytes will be written starting at offset 0
I'm an idiot, I had to use ZeroMemory(&screen, sizeof(wchar_t)) Problem solved
Обсуждают сегодня