Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
this pointer in c++
#1
What is the meaning of it. Please explain it with help of example
Reply
#2
* this means that reference of this pointer.If a user wants to return reference to the current object from a function,in such cases reference is taken from this pointer like(*this).
Example:
student student:ConfusedetRollNo(int aNo)
{
...
return *this;
}

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Explain the difference b/w Null Pointer and Null Nodes? C++ 2012 Vuhelper 0 1,950 01-06-2012, 12:24 AM
Last Post: Vuhelper
  call by value, call by reference,call by pointer in data structure 2012 Vuhelper 0 4,332 01-04-2012, 10:28 PM
Last Post: Vuhelper
  What is a Dangling pointer? Briefly explane with example. Vuhelper 0 1,880 11-05-2011, 05:13 PM
Last Post: Vuhelper
  Pointer question?? Vuhelper 0 1,420 08-30-2011, 09:55 PM
Last Post: Vuhelper
  C++ have Virtual Function vs Function Pointer call 2011 Xpert 0 5,915 05-12-2011, 09:03 PM
Last Post: Xpert
  what is cursor and why we use it. what is difference between cursor and pointer. saneha 1 7,710 05-02-2011, 06:47 PM
Last Post: Vuhelper
  Dangling pointer memory leakage Data operations saneha 0 2,499 05-02-2011, 05:43 PM
Last Post: saneha
  In aggregation we use a pointer e.g. like chair object in a room class saneha 1 2,555 05-02-2011, 04:48 PM
Last Post: Vuhelper
  const. pointer or pointer to const. char saneha 1 2,729 04-29-2011, 08:47 AM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)