Pex automagically generates unit tests for C# code.
Is there anything similar (free or commercial) for C++ code?
If you're using Visual Studio 2005 or newer, you can use Team Test. Here is a guide on how to use it.