Lesson of 7 July 2008

Overloading and template

An example of overloading

File example_overloading.cc

An example of template function

File example_template.cc

Splitting template on multiple files

File example_template2a.cc

File example_template2b.cc

Using sort of STL

File example_template3.cc

Class template and STL

A simple example of class template

File class_template.cc

An example using vector of STL

File vector_example.cc

Using STL in an old example

The prime number calculation with vector of STL

File 16.cc

A generic graphics driver with a postscript driver

Declaration of Gr::Driver class

File GrDriver.hh

Definition of Gr::Driver class

File GrDriver.cc

Declaration of Gr::PsDriver (the postscript driver class)

File PsDriver.hh

Definition of Gr::PsDriver (the postscript driver class)

File PsDriver.cc

Declaration of Gr::Object class

File GrObject.hh

Definition of Gr::Object classfile

File GrObject.cc

Declaration of Gr::Graph class

File GrGraph.hh

Definition of Gr::Graph class

File GrGraph.cc

A driver test program

File main.cc

The lesson in a zip file

The zip file lesson5.zip