C++ Qt best way to loop over a vector that is a member of a vector of parent dummy objects also being looped over
Forgive me if this has already been asked but the terminology is quite tricky to get right for me. I want to loop over a vector of objects each containing another vector of objects to be looped over in turn. The subvectors/contained vectors need to be able to be modified and not copy constructed or implicitly shared. See the code below. Does this work? If not what’s the best way to do this? Thanks!