so I'm trying to output 2 different text files, one has customer names and the other has items they are selling. I gave each customer an ID and each of their items has the same ID. Only problem is when I try to output it, it only outputs the first item with the same ID. I do not want to display the ID number at all, I think getline would show it so I am not using it.
Make first customer have three items and you will got more serious problem.
You need to change whole logic here. You best bet is to read all info from files into some container(s) and then manipulate them. You might use, say std::map<int, std::pair<customer, std::vector<item>>>, where int will be an ID and customer and item is respective structs.