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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -