Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on function overriding within the C and C++ forums, part of the Software Development category; what is function overriding...
|
|||||||
|
|||
|
Re: function overriding
Quote:
{ public: A(); virtual int functionA( int val ) { return val + val; /* some statement */ } }; class B : public Class A { public : B(); virtual void functionA( int val ) { return val - val; /* some statement */ } } |
|
|||
|
Re: function overriding
u r aware of function overloading na in which same function is overloaded wid a number of parameters....in function overridin same number of arguments a sent....of same datatype...
|
|
|||
|
Re: function overriding
now function overriding is a method of hiding some members. for a derived class if a function of the same name as that of a function in its parent class is given, the method is said to be overriden. In this case you have to declare the functions as VIRTUAL.
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| overload and overriding | skagalya | VB.NET | 5 | 09-11-2008 06:01 AM |
| Confused about Overloading and OverRiding | harisudhan | OOPS | 5 | 08-30-2008 10:36 AM |
| overriding and overloading method | Pallai_uma | Java | 9 | 05-15-2008 07:40 AM |
| Overriding forms trigger | ayar906 | Oracle | 0 | 05-09-2008 02:38 PM |
| Overriding equals for a subclass... | psuresh1982 | Java | 0 | 07-17-2007 02:31 PM |