summaryrefslogtreecommitdiff
path: root/content/html/gemfeed/2016-11-20-methods-in-c.html
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2021-05-14 09:36:49 +0100
committerPaul Buetow <git@mx.buetow.org>2021-05-21 05:11:05 +0100
commit48912c9200d86bdcd0d03d7f8beb6c57632e2fdb (patch)
tree88bbd9489292880241165242871d2373b9730338 /content/html/gemfeed/2016-11-20-methods-in-c.html
parent02c49e983d478fad99db8658180828fea0ab242e (diff)
restyle and also publish ioriot
Diffstat (limited to 'content/html/gemfeed/2016-11-20-methods-in-c.html')
-rw-r--r--content/html/gemfeed/2016-11-20-methods-in-c.html6
1 files changed, 3 insertions, 3 deletions
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 c2ae11e4..544ad28f 100644
--- a/content/html/gemfeed/2016-11-20-methods-in-c.html
+++ b/content/html/gemfeed/2016-11-20-methods-in-c.html
@@ -15,7 +15,7 @@ body {
}
img {
display:block;
- max-width: 90%;
+ max-width: 80%;
}
p.quote:before {
content: " | ";
@@ -48,9 +48,8 @@ h2, h3 {
</style>
</head>
<body>
-<p class="quote"><i>Written by Paul Buetow 2016-11-20</i></p>
-<a class="textlink" href="../">Go back to the main site</a><br />
<h1>Methods in C</h1>
+<p class="quote"><i>Written by Paul Buetow 2016-11-20</i></p>
<p>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.</p>
<h2>Example</h2>
<p>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:</p>
@@ -114,5 +113,6 @@ mult.calculate(mult,a,b));
<h2>Taking it further</h2>
<p>If you want to take it further type "Object-Oriented Programming with ANSI-C" into your favorite internet search engine, you will find some crazy stuff. Some go as far as writing a C preprocessor in AWK, which takes some object oriented pseudo-C and transforms it to plain C so that the C compiler can compile it to machine code. This is actually similar to how the C++ language had its origins.</p>
<p>E-Mail me your thoughts at comments@mx.buetow.org!</p>
+<a class="textlink" href="../">Go back to the main site</a><br />
</body>
</html>