The leaveok function defaults to moving the cursor to the current coordinates of win. The bool type is defined in the <curses.h> header file as follows: #define bool int