반응형 exception1 [HackerRank] Inherited Code - Easy https://www.hackerrank.com/challenges/inherited-code/problem Inherited Code | HackerRank Handle errors that can occur in the existing code. www.hackerrank.com /* Define the exception here */ class BadLengthException { private: int nameLength; public: BadLengthException(int n) : nameLength(n) {} virtual int what() const { return nameLength; } }; 2019. 10. 25. 이전 1 다음 반응형