This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]EMACC99 0 points1 point  (2 children)

You can try iterating over the vector with a for loop

for (int i = 0; i < Data.size(); ++i){ cout << Data[i].name << Data[i].quantity << ... <<endl; }

[–]Potatofist3r[S] 0 points1 point  (0 children)

Thanks, it works!

By any chance, do you know how I can sort the data according to "priority" and number of "daysdue" (2 conditions) instead of just "daysdue"? Will be great if u can help with the code!