What's the difference between overload and override
2011-05-18 13:06
260 查看
Overload means same function name defined in the class, but with different parameters. It's just about the polymophysm.
void func( int );
void func( double );
void fund( unsigned int );
Override means same function name with the same arguments, but defined in the parent and child class. It always used for inheritence.
void func( int );
void func( double );
void fund( unsigned int );
Override means same function name with the same arguments, but defined in the parent and child class. It always used for inheritence.
class A { public: void func( int ); }; class B : public A { public: void func( int ); };
相关文章推荐
- What's Quality of service (QoS)?
- What is Ajax?
- Search 2.0 - What's Next? [zz]
- What are the meaning of the code…
- What is i'm? Chat for charity initiative officially launched!
- What is the difference between angle bracket < > and double quotes " " while including header files
- Q:Is there any way to define what the "Open Resource" dialog in Eclipse should show?
- Visual C++ .NET: What's New for MFC Developers?
- What's New in the Visual Studio Debugger
- what's going wrong with me?
- eXpressApp Framework 8.1.5 released on 27 Jue 2008 and What'a New
- What doesn't kill you make you stronger
- what's configure
- Turning Off & editting "What's New Window" For virtuoso
- What's the difference between an event and a delegate?
- terminate called after throwing an instance of 'boost::thread_resource_error' what()
- What's 'axiom'
- What's jBox? 可移动 可编辑 可关闭 的网页对话框
- What??? You deleted "Default Web Site" from IIS?!?!
- What I find using Google "flash flickr"