Course 'CS205 C/C++ Program Design' in 2021 Fall at Southern University of Science and Technology. The lecture videos can be found at https://www.bilibili.com/video/BV1Vf4y1P7pq
Constructor and assignment
Student s2=s1;
Student s3;
s3=s1;
overload + and << for your own defined class
- Default constructor
- Copy constructor
- Assign operator
- Default destructor
- How pointer members work defaultly
Create a class for matrices which elements are in float. The class should support the follow operations and has no memory management problem. When a matrix is assigned to another by =, the two matrices will share the same data.
class Matrix{...};
Matrix a(3,4);
Matrix b(3,4);
Matrix c = a + b;
Matrix d = a * 2.0f;
- Constructor
- Destructor
Create a matrix template class which can handle different data types.
- Mr. Yitong Wang's repo for the course in Fall 2020. https://github.com/YeeTone/CS205-2020Fall