In reply to megamind:
I don’t think you can achieve what you want this way.
As you already have a print method in the “Register” class, you can add a print method in the Container class :
foreach(reg[i]) reg[i].print()
And call this method instead.