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

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.

 

Posted Date: 3/16/2013 2:58:28 AM | Location : United States







Related Discussions:- Describe "this" pointer?, Assignment Help, Ask Question on Describe "this" pointer?, Get Answer, Expert's Help, Describe "this" pointer? Discussions

Write discussion on Describe "this" pointer?
Your posts are moderated
Related Questions
Define Bitwise Left Shift and Right Shift Operators: >? The bitwise shift operators shift their first operand right (>>) or left ( // Illustration of the bitwise right shi

The ability to verify at run time the type of an object by using the typed operator or the dynamic_cast operator.

Purpose For this assignment you will need to create either a function list or a record series for a CRCRS. Instructions Note: Complete only one of the two assignment op

algorithem of compound interest

wap to read an employee salary and calculate DA,HRA,pf,GROSS,NET conditions:- BASIC DA HRA PF >10000 7% 9% 10% & >20000 9% 11% 15% &

Pebble Merchant Problem Description There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides

Question 1 Write a program that accepts two numbers from the user and swaps the two numbers without using a temporary variable Question 2 Write a program that accepts a 3x

Write a program to convert English units to metric (e.g., miles to kilometers, gallons to liters, etc.). Include a specification and a code design.

how to make a program this struct items/product

I need a project on car rental system using c programming only of college level