Introduction

Background

C is great:

  • One has control over everything

  • Dominant language for years

  • Real Men don’t do Object Oriented Programming

But

  • Same bugs over and over

    • Memory leaks and other cleanup

    • Dangling pointers

  • The need for inheritance was obvious even without language support

    • Implementation idioms were similar

    • … but never the same

    • … and always had to have too much code

History

  • 1980: Bjarne Stroustrup - “C with Classes”

  • 1983: C++

  • 1985: The C++ Reference Manual (Stroustrup)

  • 1990: The Annotated C++ Reference Manual (Stroustrup)

  • 1998: C++ ISO/IEC 14882:1998 - C++98

    • Standard Template Library

  • 2003: Standard Revision (Fix) - C++03

  • 2005 …: Technical Reports (Fixes)

  • 2011: C++11, C++14, …

    • Library extension

    • New syntax (Unification with C, …)

Content

  • Data encapsulation - Object

    • Constructor, destructor

    • Access control: public, protected, private

    • Methods and operators (Copy!)

  • Inheritance

    • Classic OO Design ⟶ science on its own

  • Templates

  • Standard Library and Standard Template Library (STL)

    • String

    • IO streams

    • Container classes

    • Threading