0 Members and 1 Guest are viewing this topic.
for(w = 0, w < levelheader->number_of_eggs, ++w){ //do something }
typedef struct LEVElHEADER{//... uint16_t number_of_eggs;//...}levelheader_t;
By the way, you used "++w", shouldn't it be "w++"? I've seen both being used but I can't understand the different.
By the way, you used "++w", shouldn't it be "w++"? I've seen both being used but I can't understand the different.EDIT: Oh wait, I got it (http://www.gamedev.net/topic/337133-i-vs-i/)
Just as a side note, it is more efficient to do ++w. So if you don't need the value of w before it's incremented, then use ++w instead.