Geeks Talk

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.

function overriding

This is a discussion on function overriding within the C and C++ forums, part of the Software Development category; what is function overriding...

Go Back   Geeks Talk > Software Development > C and C++
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 09-23-2008
Junior Member
 
Join Date: Sep 2008
Location: hyderabad
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
chinna_494 is on a distinguished road
function overriding

what is function overriding
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-26-2008
Junior Member
 
Join Date: Sep 2008
Location: Gujarat (INDIA)
Posts: 11
Thanks: 0
Thanked 2 Times in 1 Post
kunalnandi is on a distinguished road
Re: function overriding

Quote:
U can see that a Base class A having functionA() with some statement.. n tht same functionA() in class B having some different statement.. so here functionA() is overridden by class B.
class A
{
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 */
}
}
Reply With Quote
  #3 (permalink)  
Old 04-14-2009
Junior Member
 
Join Date: Apr 2009
Location: delhi
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
murshidkhan is on a distinguished road
Re: function overriding

what is function overiding
Reply With Quote
  #4 (permalink)  
Old 04-14-2009
Junior Member
 
Join Date: Apr 2009
Location: delhi
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
murshidkhan is on a distinguished road
Re: function overriding

pls send concept of function overriding
Reply With Quote
  #5 (permalink)  
Old 05-10-2009
Junior Member
 
Join Date: May 2009
Location: INDIA
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
anushandilya123 is on a distinguished road
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...
Reply With Quote
  #6 (permalink)  
Old 05-10-2009
Junior Member
 
Join Date: Mar 2009
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
diwanshuster is on a distinguished road
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.
Reply With Quote
Reply

  Geeks Talk > Software Development > C and C++

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


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


All times are GMT -4. The time now is 09:19 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved