# Best way to use a static function library in c++? Instancing etc...

**URL:** <https://forums.unrealengine.com/t/best-way-to-use-a-static-function-library-in-c-instancing-etc/51583>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [January 5, 2016, 7:01pm UTC](https://forums.unrealengine.com/t/best-way-to-use-a-static-function-library-in-c-instancing-etc/51583 "2016-01-05T19:01:08Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![DanaFo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DanaFo](https://forums.unrealengine.com/u/DanaFo)\
**Post date:** [January 5, 2016, 8:48pm UTC](https://forums.unrealengine.com/t/best-way-to-use-a-static-function-library-in-c-instancing-etc/51583/3 "2016-01-05T20:48:53Z")

</div>

Ah interesting. See I was using Rama’s example:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

and I realized that setting the (edit: didn’t mean to use the word virtual here) member functions to static allowed me to then do what you said (I was tripping a break trying to create an instance of the static lib class so I had to do some digging).

Would you be so kind as to explain as to why making it a virtual is useful and what does the ‘~’ do in that case as a prefix?

Thank you again!

---

_[View the full topic](https://forums.unrealengine.com/t/best-way-to-use-a-static-function-library-in-c-instancing-etc/51583)._
