Git Product home page Git Product logo

ooc-examples's Introduction

ooc-examples

C 语言基于对象方式的编程,通过一个 create 函数创造一个结构体(在堆上创建),用结构体指针指向它,然后定义与结构体指针相关的一系列函数,最后通过 destory 函数释放这个结构体。

在 C++ 中关注的是对象的行为(方法函数),类的成员可在设计时随时添加。同样在 C 语言中,结构体的指针可以先声明,然后定义在结构体指针上的一系列方法,随后可随时在结构体中添加成员变量。

要注意 C 结构体对象的生命周期。如果是临时使用,可声明为自动变量。

src/test-001

ooc-examples's People

Contributors

shichao-an avatar wyrover 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.