Update ex02.cpp

ch04/ex02 - add more declarations/definitions