Fundamentals of C++
C++ is a modern and powerful language. It has features that allow functional programming, procedural programming, object oriented programming and generic programming. By allowing the developer to choose and mix the programming paradigm that is most adequate for the task C++ is suitable for anything from small pieces of spontaneous code to large software projects containing 10s or 100s of thousands lines of code. This flexibility does not compromise the speed of the final application. Code written in C++ is usually faster than the equivalent code written in other languages.
The type safety which is built into the language enables developers to write stable code and catch many errors at compile time.
Our course C++ Fundamentals gives the delegates a thorough overview into the power of the language. This will enable the delegate to take on coding projects and to participate in the development in large scale group projects. Our course does not assume any prior knowledge of C++ or another programming language and is suitable for any level.
Module 1: Introduction to Programming and C++
- A short history
- What is a program?
- What is a compiler?
- Using an IDE (Visual Studio, Eclipse, Code::Blocks or KDevelop)
- A first example
- Anatomy of a C++ program
- Getting help
- A few words about style
Module 2: Variables and Expressions
- Variables: declarations and basic types (int, float, char, bool, …)
- Expression basics
- Assignment statements
- Integer operators
- Floating point operators
- Boolean operators
- Avoiding pitfalls
- Other basic types (long, double, …)
- Octal and hexadecimal constants
- Storage types (const, static)
Module 3: Control Statements
- Controlling Program Flow
- The if else statement
- Chained if else statements and the switch statement
- The while loop
- The do while loop
- The for loop
- The break and continue statements
Module 4: Strings, Arrays and Simple IO
- Arrays and indexing
- Multidimensional arrays
- C style strings and their problems
- C++ strings
- String operations
- Writing to cout and reading from cin
- Some notes on formatting
- Command line arguments
Module 5: Functions
- Structuring and reusing code
- Passing parameters
- Local variables and scope
- Returning values
- Passing by value vs passing by reference
- Recursion
- Polymorphism and overloading
Module 6: Classes
- Encapsulating data
- Class methods: providing an interface
- Hiding details: public vs private
- The “this” keyword
- Initialisation and clean up (constructors and destructors)
- Constructor overloading, the default constructor and the copy constructor
- Overloading operators
- Static members
Module 7: Pointers and References
- Pointing to memory
- Reference and dereference
- Pointers to classes
- Allocating memory (the new operator)
- Deallocating memory (the delete operator)
- Pointers and arrays
- Pointers to pointers
- Pointer arithmetic
- void and null
Module 8: Class Inheritance and Virtual Functions
- Inheriting from classes
- The is-a relationship
- Virtual functions
- References and pointers to a base class
- Abstract base classes
- Multiple inheritance
Module 9: object oriented design
- classes are concepts, objects are things
- encapsulating code, declaration and definition
- using inheritance, ”is a” relationship
- interface design
- abstract classes
- motivating examples
Module 10: introduction to STL containers
- template basics
- shortcomings of the traditional array
- vector and list
- speed considerations
- iterators
- maps (dictionaries)
- introduction to algorithms