printf pwnz cout every day of the week, especially since cout is (or at least used to be) implemented using printf.

plus its really easy to change a printf statement into a sprintf or fprintf, try...