Testing: Write a test program from scratch. Or, you can save some typing by using a framework such as googletest, boost, CppUnit, CppTest. Developerworks also has afewhelpfularticles on these frameworks.
Profiling (or why is my program so slow?): Use gdb as a Poor Man's Profiler or gprof if you're a bit more adventurous.