Just structs and pointers. And then if you don't want null pointers you can use index-based handles. Pre-fill those handle-based arrays with a dummy object at index 0. It becomes very smooth to rely on zeroed memory!
Just structs and pointers. And then if you don't want null pointers you can use index-based handles. Pre-fill those handle-based arrays with a dummy object at index 0. It becomes very smooth to rely on zeroed memory!
In any case: In C, put (void) if you mean "no params"! Otherwise your code may cause warnings or errors on some compilers (extra important if you're making a library).
In any case: In C, put (void) if you mean "no params"! Otherwise your code may cause warnings or errors on some compilers (extra important if you're making a library).
- MSVC converts it to (void) list automatically.
- But it doesn't show the usual warning that you passed too many arguments into a function.
- MSVC converts it to (void) list automatically.
- But it doesn't show the usual warning that you passed too many arguments into a function.
But writing the list as () will produce warnings etc on certain compilers. So if you make a library, put (void) as parameter list, so your users don't get sad from it puking warnings.
But writing the list as () will produce warnings etc on certain compilers. So if you make a library, put (void) as parameter list, so your users don't get sad from it puking warnings.
rl.InitWindow(1280, 720, "My Window")
defer rl.CloseWindow()
🫠
rl.InitWindow(1280, 720, "My Window")
defer rl.CloseWindow()
🫠