if I have a class...

class Note {
private:

    string step;
    string octave;
    string duration;
}:

with the appropriate access functions, and then create a class

class Measure {
private:
    
    vector<class Note> Measurenum;

};

What is the best method to access the data (presumably step, octave, and duration) in each instance of the vector Measurenum. Note that the vector must be private for this assignment.

>>vector<class Note> Measurenum;

Its vector<Note>. You don't put that class keyword.

There is no best way. Pick a way that fits the context that its used with.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.