You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// // Use this pointer to get the address of caller or current object. define a class A and a member function that returns the address of caller object.
// // Header files
#include <iostream>
// // use namespace
using namespace std;
// // define class A
class A
{
public:
// // instance member function that returns the address of caller or current object
A *getAddress()
{
return this; // this pointer points to the current object