COMP 2404 Lecture Notes - Lecture 9: Video Lesson

70 views2 pages

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.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents