Coder Social home page Coder Social logo

cpp's Introduction

类设计

构造函数

设计原则:创建对象时,是否需要默认的东西

1.默认构造函数

(1)成员变量初始化

2.带参构造函数

3.拷贝构造函数

析构函数

设计原则:是否有动态内存需要释放

(1)默认析构函数

(2)虚析构函数

操作符重载的问题

设计原则:看创建对象是否有相应的操作符要求

引用的使用

设计原则:当需要修改某个变量的值时,但不想要将整个变量所占的空间传进去时

const 的使用

设计原则:看是否需要修改变量的值

(1)引用参数值是否能被修改

(2)成员函数返回值是否能被修改


代理类

cpp's People

Contributors

tutu-jack avatar

Watchers

 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.