Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!bionet!lear From: lear@NET.BIO.NET (Eliot Lear) Newsgroups: comp.lang.c++ Subject: passing functions in C++ Keywords: how? Message-ID: Date: 25 Feb 89 00:36:02 GMT Organization: Natl Computer Resource for Mol. Biology Lines: 16 I wanted arrays that would use strings as their indices. I also wanted a way to apply certain actions to all members of a given array. What I would like to have is something like the following: void MyArray::apply(int (*f)(String,String)) In English, I'd like to pass a pointer to a function. G++ loudly objects to the above definition. Anyone got ideas? Thanks in advance, -- Eliot Lear [lear@net.bio.net]