SDL_CreateWindow questions about flags

The Wiki says that “The SDL_Window is implicitly shown if SDL_WINDOW_HIDDEN is not set”. Does this mean I can just start passing NULL for flags if all I usually pass is SDL_WINDOW_SHOWN? I’m still new to SDL2 and trying to learn the more common ways of doing some of the more basic tasks.

Code:

SDL_Window* window = nullptr;
window = SDL_CreateWindow("test window", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 800, 600, SDL_WINDOW_SHOWN);

That’s how I’ve normally been making my windows. I guess passing a NULL flag would ultimately do the same thing then in this case eh?

The Wiki says that “The SDL_Window is implicitly shown if SDL_WINDOW_HIDDEN is not set”. Does this mean I can just start passing NULL for flags if all I usually pass is SDL_WINDOW_SHOWN? I’m still new to SDL2 and trying to learn the more common ways of doing some of the more basic tasks.

Code:

SDL_Window* window = nullptr;
window = SDL_CreateWindow("test window", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 800, 600, SDL_WINDOW_SHOWN);

That’s how I’ve normally been making my windows. I guess passing a NULL flag would ultimately do the same thing then in this case eh?

I never said you said your code wasn’t working ^.^ you’re welcome for the reply. Everything I said this guy says in this video.

NewbProgramming wrote:

Trial and error, try code out and compile before posting to see if something works how you expect it to work.

I did “trial and error” and I’m not asking why my code isn’t working. I’m asking about code usage. Maybe you didn’t understand that before telling me to “Trial and error before posting”

Anyways, thanks for the reply.

SDL determines what you want for you, that’s how it’s designed.
If you pass NULL (0) what I got was a regular window, yes.

If you want something specific from SDL there’s “flags” and settings for every dynamic of SDL.

It’s supposed to be a dummy-proof library.

Trial and error, try code out and compile before posting to see if something works how you expect it to work.