Can I initialize and instance of an object in an array with its index in the array?
Below is what I want to achieve. Thanks in advance for the help. I'm a beginner so sorry if this is a very missworded question
And then
MyStruct[n].id
would equal n
and it would print n
.1 Reply
when you 1st initialized the array, fill them up immmediately