I need something like a class or struct that will allow me to put functions inside of it
<p>I am looking for an upgraded version of a struct that will allow me to put functions inside of it.</p>

<p>According to:</p>

<p><a href="http://stackoverflow.com/questions/54585/when-should-you-use-a-class-vs-a-struct-in-c">When should you use a class vs a struct in C++?</a></p>

<p>a class will not provide me with this functionality.</p>

<p>Basically, I have this code:</p>

<pre><code>typedef struct Player {
    float* xPointer;
    float* yPointer;
    float* zPointer;
    float* cXPointer;
    float* cYPointer;
    int* hpPointer;
    int* ammoPointer;
    Player(int** basePointer) {
        /* extra stuff */
    }
} Player;
</code></pre>

<p>I need a function inside of Player called updateAmmoPointer that will change the value of ammoPointer.</p>
