My problem is that every time I debugged (visual studio 2017-win 7- 32 bits- console system) everything goes normal when debugging and executing the program, but after the program ends I get the following error :
Exception produced in 0x7772EBCB (ntdll.dll) in Project1.exe: 0xC0000005: Access violation when writing to location 0x00000014. it happened.
I installed the library SDL (1.2.15)
and I really do not know what could cause it here is the test code
PS: it does not let me finish the program normally (by pressing a key) I have to stop debugging ... (Thanks in advance)
#include "SDL.h"
#include "iostream"
#include "stdlib.h"
using namespace std;
FILE _iob[] = { *stdin, *stdout, *stderr };
extern "C" FILE * __cdecl __iob_func(void)
{
return _iob;
}
int main(int argc, char* argv[]) {
if (SDL_Init(SDL_INIT_EVERYTHING) < 0) {
cout << "no podemos inicializar" << SDL_GetError() << endl;
system("pause");
}
else {
cout << "inicio correctamente" << endl;
system("pause")
}
SDL_Quit();
return 0;
}