Skip to main content
  1. /classes/
  2. Classes, Spring 2025/
  3. CS 2470 Spring 2025: Course Site/

Lecture Notes: 08 Values and References

·80 words·1 min·

Stuff to cover:

  • Handling a linked list with a for loop.
  • Header files, include guards, modules.
  • Include quotes vs angle brackets.
  • The concept of “ownership”, explicitly.
  • Passing a value by reference vs. by value.
  • Arrow vs dot in structs.
  • The “java” pattern (all refs).
  • Memory layouts of different structures.
typedef struct game {
    char* team1_name;
    int team1_score;
    char* team2_name;
    int team2_score;
} game;

typedef struct season {
    game games[3];
} season;
  • Plymouth Panthers
  • Fitchburg Falcons
  • Massachusetts Maritime Buccaneers
  • Castleton Spartans
Nat Tuck
Author
Nat Tuck