MidiStorage() doesn't actually return a value. Do you want to return midivalue?

Do you want to store them as the chars entered - or as the midivalue? Do you need to access the entered notes randomly or only in the order entered?

To store the entered values, you can use one of the c++ STL containers. Vector is probably the easiest.

Do you need to also store whether a note is a bass note or a melody note - or do you need to store these separately?