From 5b2deaa0e51468a04a3c7c72ad8e5181a8e804e2 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 28 May 2023 00:01:27 +0300 Subject: Update content for html --- .../2016-11-20-object-oriented-programming-with-ansi-c.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gemfeed/2016-11-20-object-oriented-programming-with-ansi-c.html') diff --git a/gemfeed/2016-11-20-object-oriented-programming-with-ansi-c.html b/gemfeed/2016-11-20-object-oriented-programming-with-ansi-c.html index 26dbd92a..0aa5459c 100644 --- a/gemfeed/2016-11-20-object-oriented-programming-with-ansi-c.html +++ b/gemfeed/2016-11-20-object-oriented-programming-with-ansi-c.html @@ -21,11 +21,11 @@
-You can do a little of object-oriented programming in the C Programming Language. However, that is, in my humble opinion, limited. It's easier to use a different programming language than C for OOP. But still it's an interesting exercise to try using C for this.
+You can do a little of object-oriented programming in the C Programming Language. However, that is, in my humble opinion, limited. It's easier to use a different programming language than C for OOP. But still it's an interesting exercise to try using C for this.

Function pointers



-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:
+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:

printf("%s(%f, %f) => %f\n", div.name, a, b, div.calculate(a,b));
-However, that's just syntactic sugar for:
+However, that's just syntactic sugar for:


https://lwn.net/Articles/444910/

-C is a very old programming language with it's quirks. This might be one of the reasons why Linux will also let Rust code in.
+C is a very old programming language with it's quirks. This might be one of the reasons why Linux will also let Rust code in.

E-Mail your comments to hi@foo.zone :-)

-- cgit v1.2.3