my problem probabily was another:
map<int, Light> lightmap;
lightmap[3] = light();
lightmap[4] = light();.
lightmap[5] = light();
int i = lightmap.size();
printf("ADDING LIGHT dimensione <map> %i\n" ,i); "ADDING LIGHT dimensione <map> %i\n" ,i); //this should print 3
map<int, Light> lightmap;
lightmap[3] = light();
lightmap[4] = light();.
lightmap[5] = light();
int i = lightmap.size();
printf("ADDING LIGHT dimensione <map> %i\n" ,i); "ADDING LIGHT dimensione <map> %i\n" ,i); //this should print 3
To copy to clipboard, switch view to plain text mode
now I need to to a thing (but I dont know how):
int size = lightmap.size();
for (int i=0; i<size; i++) {
lightmap[i].DOSomething();
}
int size = lightmap.size();
for (int i=0; i<size; i++) {
lightmap[i].DOSomething();
}
To copy to clipboard, switch view to plain text mode
here above I need to put in a for a my Light class function; but the for is working on elements 0,1,2; I need to use map with KEY 3,4,5 (they're iserted before).
Are u understand? thanks
Bookmarks