Inherited Code Discussions | C++ | HackerRank

Inherited Code

  • + 1 comment

    I made it like this. I don't know how do it by using sstream :(

    const char* what() const throw(){
            char* c= new char[2];
            strcpy(c,to_string(n).c_str());
            if(n<5)
                return c;
        }