I’ve recently started playing around with ncurses.
As far as I understand, C doesn’t support passing by reference.
However, there are some functions that seem to exhibit such a behavior:
calling getmaxyx(stdscr, maxRow, maxCol); assigns the the number of rows and number of columns to maxRow and maxCol respectively. getyx seems to exhibit a similar behavior.
How is this done?
This is not a direct function call, but a macro, take a look here:
For example: