hi guys please help me with this function i got this example from my book, but i have no idea how to actually call the ticket function this is the code:
#in
Why not make it static instead?
#include
class Manager {
public:
template
static int ticket()
{
return ++Manager::counter;
}
static int counter;
};
int main()
{
Manager m;
std::cout << "ticket: " << Manager::ticket() << std::endl;
}
Though really, it doesn't have to be a template either. I assume you needed information specifically about friend templates?