I have a store (txt) file that contains element .
ex:
1 2 3 4 5 6 7 8
V 4 Potato 2 Tomato 1 carrot 3 onion 1
F 2 Banana 5 Apple 2
F 3 Orange 2 Strawberry 5 Kiwi 4
V 2 Potato 4 Onion 2
P
M 3 Strawberry 3 Apple 3 Potato 3
P
V = Vegetable. F = Fruits. M = Mixt. P = Process
Each line correspond to a shopper.
try to get a program that will allow me to process all the lines (Shoppers) of this file.
The problem I have is how to get to the point where the program recognize the end of a shopper's line.
I put all the elements on a list that i named "myList". and contains word by word the element of the file
ex: myList:
if the second element is '\0' which is the null termination character you know your string had only one character so it can be either a letter or a number so if the first element of the array is between '0' and '9' it is a letter