I'm having trouble using function pointers to implement a finite state machine. I keep getting the error: 

```
b.cpp: In function ‘int main()’:
b.cpp:51: error: ‘have0’ was not declared in this scope

```

I've tried adding an & to the have0 in line 51, but that didn't do anything. I've been reading about function pointers for a hour and I still can't get it to compile. I feel my understanding of function pointers is pretty good, but clearly there is something I'm missing here. All my functions are blank because I am just trying to get it to compile right now, they will eventually be filled with logic to move through the finite state machine. Any help is appreciated. Here's my b.cpp code:

```
#include <iostream>
#include <string>
#include "b.h"

using namespace std;
typedef void (*state)(string);
state current_state;

void b::have0(string input)
{
    if(input == "quarter"){

    }
}

void b::have25(string input)
{
}
void b::have50(string input)
{
}
void b::have75(string input)
{
}
void b::have100(string input)
{
}
void b::have125(string input)
{
}
void b::have150(string input)
{
}

void b::owe50(string input)
{
}
void b::owe25(string input)
{
}
int main()
{

    string inputString;
    // Initial state.
    cout <<"Deposit Coin: ";
    cin >> inputString;
    cout << "You put in a "+inputString+"." << endl;
    current_state = have0;
    // Receive event, dispatch it, repeat
    while(1)
    {

        if(inputString == "exit")
        {
            exit(0);
        }

        // Pass input to function using Global Function Pointer
        (*current_state)(inputString);
        cout <<"Deposit Coin: ";
        cin >> inputString;
        cout << "You put in a "+inputString+"." << endl;

    }
    return 0;   

}

```

and my b.h:

```
#ifndef B_H
#define B_H

#include <string>
class b{

public:

    void have0(std::string);
    void have25(std::string);
    void have50(std::string);
    void have75(std::string);
    void have100(std::string);
    void have125(std::string);
    void have150(std::string);
    void have175(std::string);
    void have200(std::string);
    void have225(std::string);
    void owe125(std::string);
    void owe100(std::string);
    void owe75(std::string);
    void owe50(std::string);
    void owe25(std::string);

};
#endif

```