User Tools

Site Tools


lecture_materials:week_00

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
lecture_materials:week_00 [2025-08-18 22:09] Jeffrey Bergaminilecture_materials:week_00 [2025-08-19 14:31] (current) Jeffrey Bergamini
Line 119: Line 119:
 === raii.cpp (illustrating the concept of RAII) === === raii.cpp (illustrating the concept of RAII) ===
  
-<file cpp scopes_annotated.cpp [enable_line_numbers=true]>+<file cpp raii.cpp [enable_line_numbers=true]>
 /** /**
  * @file raii.cpp  * @file raii.cpp
Line 163: Line 163:
   std::ifstream othello{"/srv/datasets/shakespeare-othello.txt"};   std::ifstream othello{"/srv/datasets/shakespeare-othello.txt"};
   std::cout << "Othello: " << count_vowels(othello) << '\n';   std::cout << "Othello: " << count_vowels(othello) << '\n';
-  // std::cout is just a plain input stream:+  // std::cin is just a plain input stream:
   std::cout << "std::cin: " << count_vowels(std::cin) << '\n';   std::cout << "std::cin: " << count_vowels(std::cin) << '\n';
   // Lifetimes of `hamlet` and `othello` end here.   // Lifetimes of `hamlet` and `othello` end here.
lecture_materials/week_00.1755580168.txt.gz · Last modified: by Jeffrey Bergamini