adding lab 5 discussion

This commit is contained in:
Jidong Xiao
2024-02-06 13:25:19 -05:00
parent 6f5477d08f
commit 16db1473f2

View File

@@ -0,0 +1,9 @@
In-class discussion
Discuss the following questions with students around you.
1. What is the difference between a member function and a non-member function?
2. For a templated class, should the member function be defined within the .h file? should the non-member function be defined within the same .h file?
3. Can we use subscripting (i.e., v[i]) to access this vector and hence remove elements from this vector?
4. Erasing elements from a vector could invalidate iterators, how would this affect our program and how should we deal with this?