I just need help reading a file then everything would finally make sense.
S'mores
2
4 squares graham crackers
1 bar milk chocolate
2 large marshmallows
I can read first line with getline
I have no idea how to read the rest
3-5 lines
are divided like this
amount | shape/size | name
any help would be appreciated
Sorry, the way i explained that is also confusing to me, 5am isn't the best time for me to be up coding.
I have to read all of it.
string recipe;
int serving;
int amount;
string shape_size;
string name;
S'mores
2
4 squares graham crackers
1 bar milk chocolate
2 large marshmallows
I have tried this;
std::getline(f,recipe)
f >> serving;
f >> amount >> shape_size;
std::getline(f,name)
It's returning the wrong values.