Unfortunatel, since you did not format your code block properly (i.e. between <pre> tags) there are some bits missing, so I cannot compile what you have here. Please edit your message add the tags, and format the code, so it shows like :
I did not realize that, when I copied the code onto this forum. everything disappeared when the signs < > appeared. Thus, #include <iostream> appeared only as #include, and <T> or <int> never appeared. I'm trying to find out how to edit the posting.
P.S. Apparently this problem occurred because I had not checked the "Treat my content as plain text not as HTML" button. I have now corrected this situation. The listed program is now complete as it appears in the book.