what does this function declaration mean in c++

前端 未结 11 1906
-上瘾入骨i
-上瘾入骨i 2020-12-24 13:12
virtual const char* what() const throw()
{

}

AFAIK it\'s a function that will return a constant pointer to a mutable char. The rest I am not sure.

11条回答
  •  半阙折子戏
    2020-12-24 13:40

    virtual function returning a pointer to a non-modifiable buffer of chars, taking no arguments, does not modify any member variables of the class is belongs to (i.e. can be called on const instances), and won't throw any kind of exception.

提交回复
热议问题