Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Explaining 'RECT r' in a short way
#1
If I had to explain 'RECT r' in short way, I would do it like this:

Code:
Copy      Help
Imagine an object: a rectangle.
A rectangle has attributes for example: 4 sides and 4 corner points!
In this code you see:

RECT r

'r' now inherits the attributes from 'RECT'. In essence we created an object 'r' which has 4 attributes.
The moment I created object 'r' of the type RECT, 'r' gained the attributes of RECT.
This means the moment you type 'r' and then immediately a dot, the attributes belonging to 'RECT' are immediately accessible.
You could also say 'r' inherited the attributes from 'RECT'.

Is this an acceptable explanation? Or am I completely off?


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)