University of Lethbridge - CPSC
main.cpp – Program Walkthrough
Assignment 3 - Operator Overloading - SM 25This page walks through how to write a main() function that uses your updated RecurrenceSequence class with operator overloading.
You’ll follow five clear steps to read input, create new sequences, and print results using the new syntax.
1. Create Two Sequence Objects
We start by creating two empty RecurrenceSequence objects named A and B.
RecurrenceSequence A;
RecurrenceSequence B;Members only
Keep reading this lesson
You've reached the end of the free preview. Unlock the rest of this lesson plus 27 more lessons in University of Lethbridge - CPSC.
- Unlimited coding questions
- Unlimited access to all classroom material
- Weekly live call for questions and guidance
- 3,000 AI tutor tokens / month
- Personal SQL database (3 MB)
- Progress tracking
Cancel any time.