From ff40caa62ab4430b81e9c8d38d77d3b64814185e Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 30 Nov 2021 21:58:45 +0000 Subject: Publishing new version --- gemfeed/2016-11-20-methods-in-c.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gemfeed/2016-11-20-methods-in-c.html') diff --git a/gemfeed/2016-11-20-methods-in-c.html b/gemfeed/2016-11-20-methods-in-c.html index c871c31c..48dd5bcf 100644 --- a/gemfeed/2016-11-20-methods-in-c.html +++ b/gemfeed/2016-11-20-methods-in-c.html @@ -71,7 +71,7 @@ p.quote:after {

Methods in C

-

Written by Paul Buetow 2016-11-20

+

Published by Paul Buetow 2016-11-20

You can do some sort of object-oriented programming in the C Programming Language. However, that is very limited. But also very easy and straightforward to use.

Example

Let's have a look at the following sample program. All you have to do is to add a function pointer such as "calculate" to the definition of struct "something_s". Later, during the struct initialization, assign a function address to that function pointer:

-- cgit v1.2.3