Is there something about having a class member function try to call itself that will automatically fail that would prevent recursion within a class and how do you avoid it?

I'm trying to write a c++ conversion of a C program so I can encapsulate a certain functionality within a class, but the functionality relies on recursion to work. But when it comes to the point of making the call it's like it doesn't even run the function and automatically returns a 0. Is this normal? How do I fix it.

I could show you my code if you like but it's awfully convoluted right now.