"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 -05:00

回到话题: numnum, i have a question: Can i define virtual function as inline? Thanks

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论