I'm trying to read the data from a text file, one line at a time and put it into itemLine and then call BuildOneAttribute where I put the name into a structure I made called "Hardware" and then call BuildOneAttribute two more times to put the quantity (2nd number) and pirce (third number) also into the structure.
My while loop isn't ending though and I'm not sure what the problem is, it also doesn't seem to be reading the second line and just stopping after the first.
Just a note: you don't need '\n' since default delimiter is '\n'.
Get rid of semicolon in }; on line 23.
=! should be !=.
It seems like you're trying to loop something inside BuildOneAttribute, to do that you use while-loops or for-loops, but instead you have an ifstatement.