answersLogoWhite

0

What is 'this' pointer in c plus plus?

Updated: 8/20/2019
User Avatar

Wiki User

12y ago

Best Answer

Address of the current object.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is 'this' pointer in c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is Dazzling Pointer in c plus plus?

The pointer that points to a block of memory that does not exist is called a dazzling pointer or wild pointer


What is null object in c plus plus?

a pointer that is not pointing to anything


What is an address in C plus plus programming?

An address in C or C++ is the location in memory of an object or function. An address is the contents of a pointer, as opposed to the contents of the memory location pointed to by the pointer.


What does multiplying a pointer by 5 in C plus plus mean How does it change the pointer's value?

Multiplication is yet another thing, what you should never do with pointers.


Which function is used to determine the position of the put pointer in a file in c plus plus?

The function ftell returns the position of the file pointer for a file.


Do you have pointer concept in c plus plus language?

Yes. All string variables are pointers as are other arrays.


What is the concept of asterisk in c plus plus?

An asterisk in C++, such as int *data, is what's known as a pointer. A pointer is like a regular variable, but instead of holding a value, a pointer holds the memory location of the value. It's a somewhat difficult concept, and you can learn more about it here: See related links section below...


Call by reference using pointer in c plus plus?

Example: void foo( MyClass& object ){} // function with call by reference signature MyClass* p = new MyClass(); // instantiate a pointer to MyClass foo( *p ); // call by reference using the pointer


Can you control ports through c plus plus?

Yes. If the ports are memory mapped, then you simply need a pointer to that address, and you need to declare the pointer as volatile. If they are I/O mapped, then you need to create an _asm{} block.


How this pointer works in C plus plus?

The "this" pointer is a pointer to the instance of the object, with scope within a member function of that object. It is not always necessary to use it, as references to variables defined in the object will be implicitly prefixed with "this->", but it can resolve name scoping problems, and it can make the code more readable.


Find the greater no between two nos using pointer in c plus plus programming?

if (*&a > *&b) *&max = *&a; else *&max = *&b;


How do you declare a string array and add elements to it in C plus plus?

You cannot add elements to a fixed array in C or C++. If, however, the array is declared as a pointer to an array, you can add elements by allocating a new array, copying/adding elements as needed, reassigning the new array to the pointer, and deallocating the original array.