The course is an introduction to the C++ programming language.Core elements of the language are presented, in accordance with the relevantC++ Standard of 1998. Moreover, modern techniques of programming are employed,focusing on scientific computing.
Tuesday, 9:00-11:00, Computer Room 2 (Theory)
Tuesday, 11:00-13:00, Computer Room 2 (Exercises)
Introduction - Fundamental types and operators of C++.
C++ syntax, reserved keywords, naming rules. Fundamental types: boolean, character, integer, real, complex.
The "void" type. Enumerations. Declarations and scope of variables and constants. Structures.
Arithmetic operators, priorities. Namespaces, references, pointers.
Control structures, Loops.
If statement, (?:) operator, the switch statement, the assert function. Loop structures: while, do while, for. continue, break statements.
Functions
Function definition, declaration and usage. the main function. Overloading, function template. Math functions.
Standard Library
Containers: vector, deque, list, set/multiset, map/multimap. Iterators. Algorithms, function objects.
Advanced topics
Introduction to classes: encapsulation, inheritance, polymorphism.
Introduction to object-based and object oriented programming.
Large program structure. Interface to Fortran and C.
1. Notes: https://www.materials.uoc.gr/el/undergrad/courses/ETY213/notes.pdf
2) Bjarne Stroustrup. Programming - Principles and Practice Using C++ (Second Edition), Addison Wesley, Reading, MA, USA, 2014.
3) Stanley B. Lippman, Josée Lajoie and Barbara E. Moo. C++ Primer. Addison Wesley, Reading, MA, USA, fifth edition, August 2012.
4) Nicolai M. Josuttis. The C++ Standard Library: A Tutorial and Reference. Addison Wesley, Reading, MA, USA, March 2012.
5) Bjarne Stroustrup. The C++ Programming Language. Addison Wesley, Reading, MA, USA, fourth edition, 2013.