Original Post
Okay well first i'll state a simple situation thats quite simliar (yet far less complicated) to mine
[edited by - drekkar on March 7, 2004 11:48:44 PM]
class MyClass
{
public:
MyClass();
~MyClass();
void process();
typedef void (MyClass::*funcPtr)();
funcPtr sortedFunctions[256];
private:
void randomFunctions();
// ... many MANY functions like the avoid, all void no params
};
MyClass::MyClass(){
funcPtr[0] = &MyClass::randomFunctions();
}
// Now below is where the problem arises... I cant seem to call
// the function without an instance of the class
// (therefore i cant call it from within the class as I want to)
void MyClass:
rocess(){
// ...
sortedFunctions[0]();
}
so is there a way to make it so I can call sortedFunctions from within the class without an instance of the class? I thought making the functions static would work, but nothing I tried worked