Lecture 1 - Page 22 : 29
Notes about C++
From C to C++
* Course Introduction
Overview of Advanced Programming - Part One
Overview of Advanced Programming - Part Two
Recommended use of your time
Course Approach - Part 1
Course Exam
Which compiler or IDE?
* A quick tour of C
Basic Observations
The Evolution of C
The Popularity of C and C++
The C preprocessor
Fundamental types
Arrays and Pointers
Arrays and Pointers: Examples
Structures and Unions
Structures: Examples
Function types
User defined types
Expressions and operators
Control structures
Functions and parameters
Call-by-reference parameters via pointers
C Program organization
Memory Allocation
The standard library
* C/C++ Compatibility
C/C++ Compatibility
C/C++ Compatibility - some small details
Functions and parameters
Non-nestable functions
Parameters are value parameters - Call-by-value
Function basics
Named, statically typed
Void (returns nothing) or with a single return type
Functions cannot be nested in each other in ANSI C - C89
A non-standard
gcc
extension allows such nesting, however.
Parameters
Parameters are passed by value
Pointers passed as value parameter: "
Call-by-reference
"
Positional correspondence
There exists an "ugly" variable length parameter mechanism
Unspecified number of arguments:
int printf(const char* ...)
From C to C++
Overloaded functions: Several functions with the same name
Default arguments: Trailing parameters can be given default values in the formal parameter list
int f()
in C++ corresponds to
int f(void)
in C
Lambda expressions in C++11