Previous Lecture lect04 Next Lecture

Code from lecture

https://github.com/ucsb-cs24-s19-mirza/cs24-s19-lectures/tree/master/lec-04

Topics

Linked Lists

Unit testing

Makefiles and unit testing

Non member functions and friend functions

Operator overloading - Pages 63 - 80 in the book

We will overload some of the operators for the Quadratic and Linked List classes.

Example from reading:

point p1, p2;
if (p1 == p2){
  cout<<"Points are equal\n";
}

We will specifically discuss:

  1. Overloading binary comparison operators e.g. ==
  2. Overloading binary arithmetic operators e.g. +
  3. Overloading output and input operators e.g. » and «