Created thread12.cpp sample program.