"Virtual" means that which function will be called cannot be confirmed untill it runs. "Inline" is like "micro", after compiling, there is no function call at all. So, inline virtual function is meaningless. ....

birdincage (birdincage)
You can pass the compile, but there is no effect when runing. It is just that the compiler ignores such mixed line.

Bye the way, if you write an implement of a funciton(函数体) inside its class defination, the function is automatically an inline function. (you don't need to add 'inline' before it)
2001-6-23 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: numnum, i have a question: Can i define virtual function as inline? Thanks

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论