Move these to where they are first used, eg. for (int i = 0...) { char c = ...