C++ Templates (Lecture 20)

  • Switch all work to g++ compiler. Alter makefile for Assignments 1 and 2, remove *.o files and recompile. If you have been coding in our "style" your programs should compile without warnings or errors.

    Note that the following keywords are required by C++ but not by the C compiler:

    asm     catch   class   delete
    friend  inline  new     operator
    private protected       public  template
    try     this    virtual throw
    
  • Check out C++ annotations by Brokken and Kubat Here read pages 1-141.
    Other Interesting Links to C, C++ and UNIX Information This link also gives access to a source of frequently asked C++ questions, about points not covered in standard texts.
    The URL
  • C++-FAQs-Lite C++FAQs-lite is especially useful.

  • Discuss group dynamics and management of files.

  • Press here for previous lecture #19 (overloading, and C++ basics)

  • Press here for slides #20 (postscript) Actually several examples on Stacks.

  • Press here for PDF file of March 2001 in-class stack handout.

  • Press here for slides #20 (Netscape) Several examples on Stacks.

  • Stack Examples
  • Array Stack Example
  • Linked Stack Example
  • Default Creator Problem

  • Press here for C/Unix memory allocation.

  • C++ Mark Green Notes on templates. Templates & Classes
  • Allen Supynuk's C++ and OOP Notes