Use cout instead of printf(), cin instead of scanf(), and include iostream instead of stdio.h. Lastly, to be completely portable, I believe main() should accept nothing, not even void. For C, void is preferred.

So yeah... That's easy.