Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Classes
#5
Member functions always are called with a variable of that type. Example:

Macro
Code:
Copy      Help
CRect r1 r2
;...
r1.Func
r2.Func

If Func want to access the variable (r1, r2 or other), it can use this. It is a reference to the variable for which the function called. Example:

Member function CRect.Func
Code:
Copy      Help
out this.m_width ;;same as out m_width
out this.Area ;;same as out Area
out &this ;;address of the variable


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)