content

closed account (3Cj3AqkS)
content
Last edited on
A big part of the problem is that Sodas[5] is out of the bounds of your array. Remember in C++ arrays start at zero and end at size - 1. You should also be checking that your loop doesn't exceed the bounds of your array.

Also unless you overload the operator<< you can't just print the structure, you'll need to print the individual elements of the structure.

closed account (3Cj3AqkS)
Yeah, I just realized. Thank you. I thought I had to put the array size in there, not the position so I messed up!

Topic archived. No new replies allowed.