Path: utzoo!attcan!uunet!mcvax!ukc!strath-cs!glasgow!orr
From: orr@cs.glasgow.ac.uk (Fraser Orr)
Newsgroups: comp.lang.c++
Subject: Functions taking function parameters
Message-ID: <1340@crete.cs.glasgow.ac.uk>
Date: 9 Jun 88 20:05:34 GMT
References: <839@mmm.UUCP>
Reply-To: orr%cs.glasgow.ac.uk@nss.cs.ucl.ac.uk (Fraser Orr)
Organization: Comp Sci, Glasgow Univ, Scotland
Lines: 21

Sorry if this is a simple question with an obvious answer, but can anybody tell
me the type of a function taking a function as paramter.
For example, say I have a list class, and I want to have a member function that
performs some function on all the elements of the list ...

class List {
	SomeType Data [ SomeSize ] ;
public:
	.
	.
	.
	void Iterator ( void fn ( SomeType ) ) ;
end ;

the line `void Iterator ( void fn ( SomeType ) ) ;' gives a syntax error.

Any ideas?

==Fraser Orr ( Dept C.S., Univ. Glasgow, Glasgow, G12 8QQ, UK)
UseNet: {uk}!cs.glasgow.ac.uk!orr       JANET: orr@uk.ac.glasgow.cs
ARPANet(preferred xAtlantic): orr%cs.glasgow.ac.uk@nss.cs.ucl.ac.uk