CIS 22B - Notes for Thursday, 11/12

Announcements and Reminders

  • Assignment 8 is due Monday
  • CIS Pathways meeting for CIS Students: tomorrow noon
  • Virtual Startup Panel  discussion - Wednesday November 18 12:30 - 2:00 pm
  • TA Session tomorrow - 3 pm
  • Make-Up Assignment is posted.  One-hour assignment briefing to be scheduled this Saturday AM or Sunday PM or next Saturday AM or Sunday PM.  Email your preferred time.  Only one briefing will be scheduled.

Recording

More Class Concepts

CIS27 Notes

Examples (zip file)

The this pointer

  • this is a pointer to the current object
  • this is most often used to return by reference
Example 5-1
Example 5-2

Static Data Members

  • A static data member is a class member that is shared among all class objects
  • It is stored in static memory, not with the rest of the class objects
  • It must be defined outside of the class, in the global workspace area
Example 5-3

Static Member Functions

  • Static member functions are used to access static data members
  • Static member functions are defined outside of the class without the keyword, static
  • Static member functions do not have access to the this pointer
Example 5-4

Friends

    • Friends are non-class member functions that have access to private members of a class
Example 5-5
Example 5-7
Example 5-8
 
Function Overloading, conversions

What is operator overloading?