You declare coursestruct *course
inside main
, so it is not directly accessible from other functions (like your menu()
function).
You should do some reading on variable scope in C.
In this case, the proper fix is most likely to change your function declarations to something like
void menu (coursestruct *course);
Then call it from main
as menu(course);
. This allows the menu
function access to the variable declared inside main
.