Update hello.cpp

added add () method