// when I = the array index
drinkarray[I].name = (what you want);
drinkarray[I].cost = (what you want);
drinkarray[I].num = (what you want);
// you could also use cin for input if you need to do that
cin >> drinkarray[I].cost;
Just think of drinkarray[i] as the actual name of the struct variable in the specified array slot.
please make as solved if satisfied as this helps people help you.