当前位置: 动力学知识库 > 问答 > 编程问答 >

can pure virtual function have definition or return type "void"?

问题描述:

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: