RenhaoL / c_cpp_primer

IACS C/C++ primer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IACS C/C++ Primer

This is the public repository for the IACS C/C++ primer. The primer consists of 10 lectures held in week 42/43 in October 2021:

     Mo Tu We Th Fr Sa Su
Oct  27 28 29 30  1  2  3
 40   4  5  6  7  8  9 10
 41  11 12 13 14 15 16 17
 42  18 19 20 21 22 23 24
 43  25 26 27 28 29 30 31

The primer is intended to refresh language features for C/C++. A previous class taken for either language or experience gathered through other means is assumed.

Schedule and Location

Location: SEC LL2.224 SU Family Classroom

Time: 6:30PM - 7:30PM

Date:

  • 10/18 - 10/22 (week 42)
  • 10/25 - 10/29 (week 43)

Meeting times: The mini-class takes place during calendar week 42 and 43. Lectures are held on each week day (Mon-Fri) from 6:30PM - 7:30PM (depending on discussions during the lectures, you may need a bit of additional padding regarding the 60 minute duration).

Lecture Content

Lectures 1-4 discuss basic concepts that were firs introduced in C. Lectures 5-10 focus on C++ specific language features that are not available in C.

Lecture 1 (10/18/2021)

  • Procedural languages and Object Oriented Programming / General overview
  • Compiled languages / Stages of code compilation / Get to know your compiler
  • How to organize code in files / Headers, circular inclusion and header guards / Compilation units
  • Building code / make / meson / cmake

Lecture 2 (10/19/2021)

  • Basic built-in types
  • Arrays
  • Pointers
  • Pointers are not arrays

Lecture 3 (10/20/2021)

  • Pointers and dereference operator
  • References (C++ specific)
  • Basic operators and operator precedence
  • Functions and function pointers
  • Anonymous functions / Lambdas (C++ specific)

Lecture 4 (10/21/2021)

  • Function arguments: Pass-by-value / Pass-by-reference
  • Memory allocation
  • Stack and heap
  • Input/Output (IO) / Streams

Lecture 5 (10/22/2021)

  • Object Oriented versus Data Oriented designs / Where is C++ good at and where can it hurt you
  • Classes: Constructors / Initializer lists / Destructors / Members / Attributes
  • Access modifiers

Lecture 6 (10/25/2021)

  • Resource Acquisition Is Initialization (RAII)
  • Operator overloading
  • Inheritance and the this pointer

Lecture 7 (10/26/2021)

  • Base class pointer
  • Polymorphism and interfaces

Lecture 8 (10/27/2021)

  • Abstract base classes
  • Pure virtual methods
  • Operator overriding

Lecture 9 (10/28/2021)

  • Generic programming
  • C++ templates
  • Implementation approaches

Lecture 10 (10/29/2021)

  • Standard Template Library (STL)

About

IACS C/C++ primer


Languages

Language:C++ 97.9%Language:Meson 2.1%