Lecture overview -- Keyboard shortcut: 'u'  Source programs in previous lecture -- Keyboard shortcut: 'p'  Source programs in next lecture -- Keyboard shortcut: 'n'  Course home

Source Programs
Basic facilities, Part 1

The Note Context in the rightmost column is only shown in case an annotated program exists. - You can navigate to the annotated program via the annotated slide view (= 'the note context').

Illustration of declarations and definitions - everything is fine.decl-def.ccSlide context--
Illustration of declarations and definitions - several problems.decl-def-problems.ccSlide context--
Examles of declarations.decl-str-1.ccSlide context--
More examples of declarations.decl-str-3.ccSlide context--
Examles of declarations of multiple names.decl-str-2.ccSlide context--
Declarations before statements - C89 Style.less-localized.ccSlide context--
A declaration is a statement in C++.localized.ccSlide context--
A declaration in the condition of an if.decl-in-if.ccSlide context--
Examples of lvalues.lval-1.ccSlide context--
Examples of rvalues.rval-1.ccSlide context--
C++ References.ref.ccSlide context--
A variable becomes a reference to another variable.ref-basic.ccSlide context--
No operator operates on a reference as such.ref-basic-2.ccSlide context--
A typical use of references: A number of results passed back from vector_min_max via references.min-max.ccSlide context--
A function that attempts to return references to local variables.ref1-bad.ccSlide context--
Ditto - handling the problem by making the local variable static.ref1-better.ccSlide context--
A function with reference parameters and reference return type.ref1.ccSlide context--
Convenient references to long/deep fields.ref-fields.ccSlide context--
Const ref scheme.const-ref-t-1.ccSlide context--
The initialization of const reference var from rvalue, with type conversion.const-ref-int.ccSlide context--
A similar program that initializes a user defined struct via a 'functional casting' constructor.const-ref-t-3.ccSlide context--
Use of a const reference in the vector_min_max function (alread encountered in this lecture).min-max-1.ccSlide context--
Illustrates that it is not good to return a const reference to a deallocated local variable.const-ref-t-2.ccSlide context--
Two versions of swap - with references and with pointers.swap.ccSlide context--
Illustration of Rvalue references - in contrast to other kinds of references.rval-1.ccSlide context--
The compilable parts of the program from above.rval-1-compilable.cc Slide context--
Two versions of swap - with Lvalue references and Rvalue references.swap1.ccSlide context--
Sample use of auto in C++11.auto2.ccSlide context--
Same - without std:: - with using namespace std.auto3.ccSlide context--
Same - illustrates deduction of a functions return type in C++14.auto4.ccSlide context--
Trivial uses of decltype.dt1.ccSlide context--
A sample use of decltype in a function template: matrix plus.dt2.ccSlide context--
Another sample use of decltype in a function template: container example.dt3.ccSlide context--
Four forms of initialization.forms.ccSlide context--
Default initialization.init2.ccSlide context--
Initialization and narrowing.init1.ccSlide context--
Initialization and auto - problems.init3a.ccSlide context--
Initialization and auto - OK.init3b.ccSlide context--
Initialization - ambiguities.init4.ccSlide context--
Examles constants, pointers to constants, and constant pointers.const-ptr-1.ccSlide context--
Only the valid parts of the program from above - compiles.const-ptr-1-valid-feb-14.ccSlide context--
point.h - just for reference.point.hSlide context--
point.cc - just for reference.point.ccSlide context--
The C# Point class.Point.csSlide context--
A C# client class of class Point.Prog-no-comments.csSlide context--
A C# client class of class Point - with comments that reveal the output.Prog.csSlide context--

Generated: Tuesday August 1, 2017, 13:25:55