Create ex31.cpp