Can someone please explain to me the meaning of the first parentheses in the following statement:
Window* win= (main_window*) glfwGetWindowUserPointer(main_window);
Can someone please explain to me the meaning of the first parentheses in the following statement:
Window* win= (main_window*) glfwGetWindowUserPointer(main_window);
Casting in C. Means that memory you get from function will be casted to main_window
type of your structure or class you have.
This will help compiler to know everything about your data offsets in structure or class. It will also prevent any warnings from compiler.
This will be later assigned to win variable.