Describe "this" pointer?, C/C++ Programming

Assignment Help:

It is a pointer accessible only in the member functions of a struct, class or union type. It points to the object for which the member function is called. Static member functions do not have this pointer. While a nonstatic member function is called for an object, the address of the object is passed out as a hidden argument to the function. For instance, the following function call

myDate.setMonth( 3 );

may be interpreted this way:

setMonth( &myDate, 3 );

The object's address is accessible from in the member function as the pointer. This is legal, by unnecessary, to use this pointer while referring to members of the class.

 


Related Discussions:- Describe "this" pointer?

Main program to test the basic operations, The Main program is slightly mor...

The Main program is slightly more complicated and you need to think about the I/O process. First of all, for most applications you do not call the low level routines GetChar and P

Xmugler, #solution for decode the code for smuglers

#solution for decode the code for smuglers

C program for function of compound interest, C Program for FUNCTION  OF CO...

C Program for FUNCTION  OF COMPOUND INTEREST float ci(float,float,float); void main() {           float p=0,r=0,n=0,k=0;           clrscr();           printf("EN

''c'' programme, Write a ''C'' program to accept any 3 digit integer number...

Write a ''C'' program to accept any 3 digit integer number from the keyboard and display the word equivalent representation of the given number.

Develop libcurl xml project, Develop libcurl XML project I have a Projec...

Develop libcurl XML project I have a Project using XML with C++. You will use things like LIbcurl etc....and a XML parser to finish the project. Developer must know how to use X

C program for bubble sort, C program for bubble sort: void main() {...

C program for bubble sort: void main() { int i,j,k,a[10],n; clrscr(); printf("How many values you want to enter\n"); scanf("%d",&n);  for(i=0;i  {  pri

Arrays, Write two different arrays. Store the names in it and then compare ...

Write two different arrays. Store the names in it and then compare if both the names entered by the user are the same.

Pointers, one of the applications of computers in numerical analysis is com...

one of the applications of computers in numerical analysis is computing the area under a curve. one method of calculating the area under acurve is to divide the area int a number o

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd