Skip to main content

Course Information

In this web page we provide the syllabus of the course Introduction to the C++ Programming Language, offered by the Department of Physics.

The list of the courses offered during the current accademic year is available here

The list of all courses offered by the Department of Physics is available here.

Code Φ-251
Title Introduction to the C++ Programming Language
Category C
ECTS 6
Hours 4
Level Undergraduate
Semester Winter
Teacher S. Stamatiadis
Program

Tuesday, 9:00-11:00, Computer Room 2 (Theory) 
Tuesday, 11:00-13:00, Computer Room 2 (Exercises)

Course Webpage https://www.materials.uoc.gr/courses/emy418/
Goal of the Course

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.

Syllabus

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.

 

Bibliography

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.