I'm trying to get this data from a text file and it's giving me a weird errer where it's telling me it can't find a function called gerline. I don't know what's causing this.
1) With this form of getline, getline expects the second argument to be a string. It's not. The type of your second argument is snacks. Presumably, you have not provided an overload of getline the takes an istream and a snacks object.
2) Line 14: You're making an out of bounds reference. thing is declared with a dimension of 6. That means the elements of thing are [0] to [5]. thing[6] does not exist. In C++ elements of an array are 0 based, not 1 based.