I want to pass a function in an object, is it possible??, how would i prototype the class constructor to accept that, given the class pass below and the function show() so that i would create an object and pass it ie

pass item(show());
void show()
{
   cout<<"hello world";
}

class pass
{
   pass();

};
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.