What's the meaning of unqualified-id?

catch( const std::runtime_error & e)

{

....

}

When compile, met an error:

error: expected unqualified-id before &.

It was so puzzling.

 

With experence in C++, fixed it after including head file <stdexcept>.

Then may I understand unqualified-id as incomplete class? If so, this error message just says "need a type or class before & even it is incomplete". The implication is that runtime_error is nod declared or not declared as a class.

 

posted @ 2019-02-18 13:51  耕读编码  阅读(136)  评论(0编辑  收藏  举报