问题描述:

My Question is :

Can a pure virtual function have return type VOID ?/

or you can can is it true that a pure virtual function can only have a return type "VOID"?

Second question is :

Can a pure virtual function have definition ?

or a pure virtual function can have definition is it true ?

网友答案:

Yes, a pure virtual function can return void.

No, a pure virtual function cannot have a definition. The "pure" in "pure virtual" means that it has no default definition.

相关阅读:
Top