Introduction
In this post I am going to explain to you meaning and working a static function in practice. Let’s start and I will try to convince you that it isn’t hard to understand and use.
Practice
Let’s start coding…. . If you have little problems, return to my previouses posts and read again.
Everything should works properly. Now, I have a question for you: Can I use the function ‘void price_gross()’ in another place ? Beyond the class ‘Library’ ? I want to evaluate a gross price for other thing. I wouldn’t create a new class and write the same function again. Have I a chance to use this function anywhere yet ?
Yes, of course. In this situation very helpful is a static function. See how to do this:

That’s all what you need to add, simultaneously I want to tell you something: in a static function you can’t refer to variables in given class.
