I'm in learning but I stuck a little and can't get it understood..
there is this class and "I would need" 16 instances of it.. in my opinion it would make sense to make some 16 variables inside the class, so the object has them all
..but i need to interate through the object.. and I don't get it, how I could get this managed?
is there something similar to foreach() from PHP?
It is a ranged for loop or if you are familiar with other languages a for-each loop. Its downside is there is no index, but if you are acting on each element in an array it is useful.
Also, by adding begin() and end() functions to objects, you can also iterate those. For instance I have added them to the String library and I also included the functionality into the EEPROM library I wrote (built into IDE).
This is a pretty much unknown feature of the library as it stands... never had any questions about it: