ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories >> Software >> Programming-Languages >> C++ >> OOPS
 
 
 
Question
Which is the parameter that is added to every non-static 
member function when it is called?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
Answer
Ex:

   class Employee{
        public:
          int member_Function1(){}
          void display()
          {
              do something;
          }
};
int main()
{
   Employee e1;
   e1.member_Functiuon(int a, int b);------> refer below 
1...
}

1...

Here e1 is an object of Employee Class.
Now e1.member_Function(int a, int b) means 
      implicitly the this pointer is applied to the 
function as

      member_Function(Employee *const this, int a, int b).

      Here the implicit this is a constant pointer to the 
object's address of type Employee. Once the Object has been 
created the address is given to it(e1). the address is 
passed as the first argument becoz the function resolving 
is faster...
 
0
Manjunath
 
View All Answers
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com