Update ailab1.cpp

Added a reset() function