Replace printf with cout.