ex2.cxx complete