c - End of menu is closing program -
i've got working linked list within function, program begins calling menu (switch statement in function) in main
, gives option to:
- add data linked list.
- save data text file.
- display data.
i'm having trouble working out how call menu program once functions come end. once have added data linked list program ends. how make program call menu again instead of terminating?
main() { menu(); } void addpacket() { //linked list inside here } void menu() { //menu creation }
i tried not add loads of code because last 2 questions i've asked other people have completed code me , want try work 1 out myself.
you should have call menu()
inside loop. way, when addpacket
returns, go through iteration. assuming call addpacket()
within menu()
.
Comments
Post a Comment