So I never did exception handling and didn't knew the meaning of that throw() in the member function declaration.
I checked here on the site -> http://www.cplusplus.com/doc/tutorial/exceptions/
and it says
Exception specification
Older code may contain dynamic exception specifications. They are now deprecated in C++, but still supported. A dynamic exception specification follows the declaration of a function, appending a throw specifier to it.
So I don't want to go and practice on deprecated code, can someone more experienced about current C++ show me an example of how the example above would be properly done?
C++17 removed dynamic exception specification completely, but kept "throw()", because so much existing code uses it, redefined as deprecated exact synonym of "noexcept". If you feel like updating that example, just use noexcept instead -- http://en.cppreference.com/w/cpp/language/noexcept_spec