I want to intialize a certain type of element (a class called *TMMap) that I have in my main class TWorld. There are a lot of these elements and they all have different names. I need all of them to be created and initisalized and to a certain value. This is done in a function NewMap(0).
Can I find all members of a class of a certain type?
something like:
for (i = 0; i < nr of members in class TWorld; i++)
if (member is of type TMMap)
TMMap *T = (typecasting TMMap) member(i);
T = NewMap(0);
for (i = 0; i < nr of members in class TWorld; i++)
if (member is of type TMMap)
TMMap *T = (typecasting TMMap) member(i);
T = NewMap(0);
To copy to clipboard, switch view to plain text mode
Bookmarks