Hello, I am completely new to coding as an entirety and don't particularly have the best professor teaching me. I am trying to create a program that helps a restaurant use an automated billing system. The menu data comes from a text file that I have created in my projects folder. I am trying to just get the text file data to display, but I cannot get it to do so for whatever reason. I don't want anyone to write the code for me so I'm hesitant to post the assignment requirements. I barely have anything right now, but I would greatly appreciate it if someone could explain to me why my data won't display.
You are both reading and attempting to write beyond the end of the arrays.
Line 26 is passed when itemNum gets to 7, .... then line 28 increases itemNum to 8, ... and you try to read one beyond the end of the array.
The loop starting on line 32 loops forever (provided it works out what it can do with the non-existent array elements on line 37, with itemNum now pointing beyond the end of the array).
Don't use conio.h. It isn't standard c++ and I can't see anything remotely needing it.