From b60fc424ae86381c4cee105be1ed809e7b31b0b8 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 1 May 2021 18:59:02 +0100 Subject: add dns blog post --- content/html/gemfeed/2016-11-20-methods-in-c.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'content/html/gemfeed/2016-11-20-methods-in-c.html') diff --git a/content/html/gemfeed/2016-11-20-methods-in-c.html b/content/html/gemfeed/2016-11-20-methods-in-c.html index 5de22d33..6024c3fb 100644 --- a/content/html/gemfeed/2016-11-20-methods-in-c.html +++ b/content/html/gemfeed/2016-11-20-methods-in-c.html @@ -23,7 +23,7 @@ li { color: #98be65; }

Methods in C

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

Example

-

Lets take a look at the following sample program. Basically 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:

+

Lets have a look at the following sample program. Basically 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:

 #include 
 
-- 
cgit v1.2.3