added ch12n5.cpp with some bugs