C++
[HackerRank] Inherited Code - Easy
호아나트
2019. 10. 25. 18:10
반응형
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;
}
};
반응형