I write this program to imitate a cash register and have the data for the stock currently in shop,the problem arise whenever i put the code = 10, when i use the function to read