Created thread04.cpp sample program.