I know I'm going off-topic but using dumb and long algorithms like the ones you use only make it easier for you to commit mistakes. Besides, I really think you don't understand the concept of arrays, pointers and loops. You could have your ID variable be an array and store all the values... yet that would be completely useless... Why don't you use teams[print].player_array[i] ? Here's what you could do if you really don't want to type teams[print].player_array[i] ...Coding the way you are right now, you will never be able to code any program larger than basic console programs. When you get to write OpenGL game, will you hard-code every single pixel instead of using the right tools ? Do you realize I have just written in 3 lines what you coded in over 30 lines ? You're writing 10 times too much code.Code:PlayerInfo* p = teams[print].player_array; for(int i = 0; i < teams[print].noPlayers; i++) printf("Player %d: %d\n", i, *(p + i));