Code Monkey home page Code Monkey logo

cpp's Introduction

Programming in C/C++ Efficiently

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

Chapter 11: Dynamic Memory Management in Classes

Some Default Operations

  • Default constructor
  • Copy constructor
  • Assign operator
  • Default destructor
  • How pointer members work by default

An Example with Dynamic Data Allocation

Solution

Matrix Data Management in OpenCV

Lab

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;

Chapter 12: Class Inheritance

Deriving a Class

  • Constructor
  • Destructor

Static and Dynamic Binding

Vitural Functions

Access Control (protected)

Dynamic Memory Management

Lab

Chapter 13: Class Templates and std Library

Defining a Class Template

Templates in OpenCV

Templates in std

Lab

Create a matrix template class which can handle different data types.

Chapter 14: Exceptions

Chapter 15: Friend Classes and Nested Classes

Reference

  1. Mr. Yitong Wang's repo for the course in Fall 2020. https://github.com/YeeTone/CS205-2020Fall

cpp's People

Contributors

shiqiyu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.