それ、
addImage("fileName%02d.png", counts)
とかにしてない?
%のformat文字列は文字列クラスのメンバかsprintf 使わないとダメじゃね?