summaryrefslogtreecommitdiff
path: root/content/html/gemfeed/2016-11-20-methods-in-c.html
diff options
context:
space:
mode:
authorPaul Buetow <git@mx.buetow.org>2021-05-03 09:03:54 +0100
committerPaul Buetow <git@mx.buetow.org>2021-05-21 05:11:04 +0100
commit018c9341943bf96cc3e8fc397a768fd8fd5338c0 (patch)
tree32da4d59632a0e54ce9439020b89281f2aa4dcf5 /content/html/gemfeed/2016-11-20-methods-in-c.html
parent275ae06e22840ed1b915ddd313ce32c714de56a9 (diff)
correction
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.html2
1 files changed, 1 insertions, 1 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 f764e8d9..18e7accb 100644
--- a/content/html/gemfeed/2016-11-20-methods-in-c.html
+++ b/content/html/gemfeed/2016-11-20-methods-in-c.html
@@ -76,7 +76,7 @@ Division(3.000000, 2.000000) =&gt; 1.500000
</pre>
<p>Not complicated at all, but nice to know and helps to make the code easier to read!</p>
<h2>The flaw</h2>
-<p>That's actually not really how it works in object oriented languages such as Java and C++. The method call in this example is not really a method call as "mult" and "div" in this example are no "message receivers". What I mean by that is that the functions can not access the state of the "mult" and "div" struct objects. In C you would need to do something like this instead if you wanted to access the state of "mult" from within the calculate function, you would have to pass it as an argument:</p>
+<p>That's actually not really how it works in object oriented languages such as Java and C++. The method call in this example is not really a method call as "mult" and "div" in this example are not "message receivers". What I mean by that is that the functions can not access the state of the "mult" and "div" struct objects. In C you would need to do something like this instead if you wanted to access the state of "mult" from within the calculate function, you would have to pass it as an argument:</p>
<pre>
mult.calculate(mult,a,b));
</pre>