constructor with a *(ptr) function??

public:

Table( int n, int (*map)( Key k) );


When I create my object in main, how do I pass in the parameters to the constructor with a function ptr in the constructor?
1
2
3
4
5
6
7
8
int foo(Key key)
{
    //Function
}

//...

Table bar(5, foo); //Creates Table object passing foo as second parameter 
Topic archived. No new replies allowed.