The function has to return no value and accept no arguments.
Then you have to understand, that your're passing a pointer of a function. That is a place where the function starts. It contains no additional data, such as its arguments. If you want to pass arguments too, read this thread : http://www.cplusplus.com/forum/general/27541/
When you pass a function as a parameter to another function you only pass the address of the function. You can not specify the parameters because passing the address of the function is not the same as calling the function. It is down to the function that you passed it to to supply the parameters when it calls the passed in function.
AFAIK, it is guaranteed that the registered function (Blah::blah) will be called before the destruction of any static objects created before the registration, so this should not cause any problems.
EDIT: Mmm... I'm not sure for cout... Maybe someone else knows better...
How feasible would it be to change this atexit function to be a template? You could then pass it function objects which contain the paramters as member variables like so:
It is down to the function that you passed it to to supply the parameters when it calls the passed in function.
Since you have the code and you can modify it, of course you can do it.
You can wrap the caller in a class and have it call with the proper parameters (don't really have to be static, either), exactly like the way darkestfright coded it up.
If you want to wrap them in a class and use the C library atexit, they have to be static. The function has to be static (since that's what atexit expects), therefore the params have to be static (because a static function can't operate on non-static members).