This is my C++ file:
#include <iostream>
#include "window.h"
#include <SDL2/SDL.h>
int main(int argc, char* argv[]) {
if (SDL_Init(SDL_INIT_EVERYTHING) < 0) {
std::cout << "Something went wrong" << std::endl;
}
else {
SDL_CreateWindow("Neptune's Limit", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1024, 768, SDL_WINDOW_OPENGL);
}
return 0;
}
When I run it, it flashes up for a half a second and then immediately closes. I have looked at the other posts about this, but the answer to them was about SDL_EVENT
. I do not have that anywhere in my program.
What could be wrong?