University of Lethbridge - CPSC
Completing the main() Function
Assignment 1 - Movie1 - SM 25What does main() already do?
You're already given a strong starting point. It:
Sets up the
titlesandyearsarraysCollects movie input from the user
Uses
"done"to stop the input loopCreates space to eventually call
resize(),sort(), andsearch_and_report()Cleans up memory at the end
All that’s left is to:
Add a call to
resize()when the array is fullCall the
sort()function after input is completeRun both searches using
search_and_report()inside the search loop
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.