本文通过一段简短的示例程序,展示在c++中virtual函数的使用方式
示例程序:
1 |
|
输出:
setup in A
layerSetup in B
reshape in Bsetup in A
virtual layerSetup in A
virtual reshape in Asetup in A
layerSetup in B
reshape in Bsetup in A
virtual layerSetup in A
virtual reshape in A
本文通过一段简短的示例程序,展示在c++中virtual函数的使用方式
示例程序:
1 | #include <iostream> |
输出:
setup in A
layerSetup in B
reshape in Bsetup in A
virtual layerSetup in A
virtual reshape in Asetup in A
layerSetup in B
reshape in Bsetup in A
virtual layerSetup in A
virtual reshape in A
WeChat Pay
Alipay