what I can see is, that it will certainly crash if you add more than 1 item to your inven
. The same as order
what exactly are the steps that causes the crash with NetBean?
in readOrder()
(you call that in callSystem()
) you have
date = new char;
so you allocate space for one char
Here:
inFile.getline(date,9);
you read upto 9 chars. This means out of bounds.
So why don't you use string for date
. It also means a memory leak.