Professional Documents
Culture Documents
Module2 PDF
Module2 PDF
Module2 PDF
Key Concepts
15-1 Intr0duction
The most important feature ofC++ is the "class•. Its significance is highlighted by the £act
that Stroustrup initially gave the name "'C with classes" to his new language. A class is an
� We may use objects as funetion argument,.
� A function declared as a friend is not in the scope of the class t.o which it has beeo
declared as friend. It has full aeeess to the private members of the class.
¢> A function can also re.turn an object.
¢> If a member function does not alter any data in the class, then we may declare it as a
const member function. The keyword con&t is appended to the function prototype.
� It is also possible to define and use a class inside a function. Such a class is called a local
class.
Key Terms
> abstract data type > obj.as
> arrays of objecta > pass-by-reference
> class > pass-by-value
> class declaration > period operator
> class members > private
> class variables > prototype
> const member function.a > public
> data biding > scope operator
> data membero > scope resolution
> derefercncmg operator > static data membt,,n
> dot operator > static member functions
> element.a > static variables
> encap"ulatio11 > struct
> friend function, > structure
> inheritnnC4;1 > structure members
> inline functions > structur& name
> local cla�s > structure tag
> member functions > template
> nesting of member functions