i did some debugging and made a separate program
it works. if you are going to run it on your computer i'd change the loop to 20 instead of 50 b/c it takes a while.
for (INT col = 1; col < 50; col += 1)
for (INT row = 1; row < 50; row += 1)
COLORREF pixColor = GetPixel(hdcScrn,col,row);
array1[row][col] = pixColor;
cout << row << " ";
cout << col << " ";
cout << array1[row][col] << endl;
when i change the loop values to my original program and declare the array to be bigger it exits just like before.