I have never used istringstream before. I have only split lines before with 1 delimiter so I don't know how to use istringstream. I am splitting lines from a file that look like this:
Table, Wanted, 100
Car, For Sale, 5000
I need to split the strings and then create an array of structs. I have a struct set up already I just don't know how to split the strings. My struct is called item and has types: string type, bool sale, double price. For sale, I want it to say 1 if it is for sale and 0 if it is wanted. Basically, I want to split it so I can create new variables, type, sale, and price and then create a newItem{type, sale, price} in my item struct and go from there. An example of the code would be extremely helpful. Thanks so much.