OK so i'm working on a programming project and for it I have to use a custom class,
After an object of the class has been created it needs to be added to something like an array where I can access it and get its personalized properties back
Is this possible ?
Thanks
Class Detection and Selection
What languege are you using? Of course this is possible, but it really depends on the languege. In C++ for example you could use std::vector or std::map to achieve this.
Ok after some research I found some stuff out so I thought I would share it:
Say banana is your custom class.
Dim bananasgroup(10) as banana
banana(0).juicy = 1
banana(3).juicy = 3
Then to save this array...
For each i as new banana in bananasgroup
Save(i.juicy)
next i
Where save is your function, hope this clears some stuff up, it certainly did for me
Say banana is your custom class.
Dim bananasgroup(10) as banana
banana(0).juicy = 1
banana(3).juicy = 3
Then to save this array...
For each i as new banana in bananasgroup
Save(i.juicy)
next i
Where save is your function, hope this clears some stuff up, it certainly did for me
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement