Computer Programming - strona 9

note /search

Nested class declarations

  • Politechnika Śląska
  • Computer Programming
Pobrań: 0
Wyświetleń: 525

Nested class declarations  class declar ation may be nested inside other class declaration  nested class is not visible in the global scope ...

Object - a generalized structure

  • Politechnika Śląska
  • Computer Programming
Pobrań: 0
Wyświetleń: 462

Object - a generalized structure  Declaration: class person me, You; person boss; // while declaring/defining object // ”class”, ”struct” or ”union” may be skipped  Usage: boss.input(); boss.output(); ...

Order of evaluation

  • Politechnika Śląska
  • Computer Programming
Pobrań: 0
Wyświetleń: 434

Order of eval uation  order of evaluation is undefined, except for: , || &&  ” , ”, ” || ”, ” && ” evaluated in the left to right order  right arguments of operators ” || ”, ” && ” are evaluate d only if necessary ...

Structures

  • Politechnika Śląska
  • Computer Programming
Pobrań: 0
Wyświetleń: 504

Structures  Structures in C++ are classes too struct A { contents... } is equivalent to class A { public: contents... } ...

Accessibility of base class members

  • Politechnika Śląska
  • Computer Programming
Pobrań: 0
Wyświetleń: 308

Accessibility of base class members class derived : public base; class derived : protected base; class derived : private base; class derived : base; // default: private ...

Assignment operator

  • Politechnika Śląska
  • Computer Programming
Pobrań: 0
Wyświetleń: 399

Assignment operator  Defined as a nonstatic class member T& T::operator=(const T &)  No initialization list, it's not a constructor !!! ...

Other extensions

  • Politechnika Śląska
  • Computer Programming
Pobrań: 0
Wyświetleń: 469

Other extensions  Templates - to use instead of macros (and not only)  Exceptions - to handle errors  Namespaces - to limit the scope of names ...

Programming paradigm

  • Politechnika Śląska
  • Computer Programming
Pobrań: 0
Wyświetleń: 448

Programming paradigm  A programming paradigm - a fundamental style of computer programming  Programming paradigms - structural programming - procedural programming - object oriented programming - logic programming ...

Overloadable operators

  • Politechnika Śląska
  • Computer Programming
Pobrań: 7
Wyświetleń: 504

Overloadable operators () [] - + - ++ -- ! ~ * & new delete (typ) // unary -* * / % + - = == != & ^ | && || = += -= *= /= %= &= ^= |= = // assignment ...