Hey!
I am new to SDL library and I have problem. I am trying to fill surface called ground and then blit it to main screen surface. When I am debugging my code, I my window crashes and this appear
1 2
First-chance exception at 0x00051537 in testpowierzchnie.exe: 0xC0000005: Access violation reading location 0x00000004.
Unhandled exception at 0x00051537 in testpowierzchnie.exe: 0xC0000005: Access violation reading location 0x00000004.
Here is something wrong with filling ground surface, if I remove it, everything works.
Also, I'm not too familiar with SDL, but some of that code looks suspicious, to say the least - ground and screen are both null yet you pass them as parameters as if they are initialized.