Git Product home page Git Product logo

oop-in-c's Introduction

Brought to you by:

Quantum Leaps


Object-Oriented Programming in C

The Accompanying Code

This repository provides the code accompanying the article: "Object-Oriented Programming". The code can be compiled and executed on any desktop computer (running Windows, Linux, or macOS).

Here is the code structure:

OOP-in-C
+---doc
¦       AN_OOP_in_C.pdf
¦
+---encapsulation
¦       main.c
¦       make.bat
¦       oop_in_c.exe
¦       shape.c
¦       shape.h
¦
+---inheritance
¦       main.c
¦       make.bat
¦       oop_in_c.exe
¦       rect.c
¦       rect.h
¦       shape.c
¦       shape.h
¦
+---polymorphism
        circle.c
        circle.h
        main.c
        make.bat
        oop_in_c.exe
        rect.c
        rect.h
        shape.c
        shape.h

Building and Running the Code

Each of the sub-directories contains make.bat (for Windows) that allows you to build and run the provided examples. (On Linux/macOS you can execute the commands from make.bat directly from the tarminal).

For example:

C:\GitHub\OOP-in-C>cd encapsulation
C:\GitHub\OOP-in-C\encapsulation>make

gcc shape.c main.c -o oop_in_c
oop_in_c

Shape s1(x=0,y=1)
Shape s2(x=-1,y=2)
Shape s1(x=2,y=-3)
Shape s2(x=0,y=0)

Videos

The concepts of OOP in C have been explained in a series of videos:

The PDF Version

The PDF version of the "Object-Oriented Programming" article is provided in the directory doc

Object-Oriented Programming in C

How to Help this Project?

If you like this project, please give it a star (in the upper-right corner of your browser window):

GitHub star

Contact Information

oop-in-c's People

Contributors

quantum-leaps 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.