COMP 2404 Lecture Notes - Lecture 9: Video Lesson
Document Summary
The list implemented is from stl as container class. In her coding examples for list container classes we can have functions like merge,sort and unique. The list can be merged easily like this comp2404. merge(comp300). So after comp2404 and comp3000 list is merged we have all the students that are enrolled in both, so we have duplicates as well (the ones who take comp2404 and comp3000). == operator like this bool student::operator ==(student& stu) { return number == stu. number }; To sort a list lets say we want to print timmy, joe, matilda and others in alphabetical order then we actually have to compare them with < operator. What is a stream? sequence of bytes, free flow of data from a source to a program memory, from a program memory to a sink. data sinks and sources keyboard,printers, files . etc. Characteristics of istream: two type of inputs formatted and unformatted data formatted >> operator unformatted get, getline.