cout is a defined member of an 'ostream', which are type safe at compile time, and you can define your own actions. They're also simpler:

Code:
printf("%s = %d\n", mychar, mynumber);

cout << mychar << " = " << mynumber << endl;
if you have your own class, then you can make it define something so that you can put it into the stream, and it will display as you want it to.