Use structure size in loops