Article View: net.lang.c++
Article #149Re: address of constructor
From: Rob McMahon
Date: Mon, 07 Apr 1986 10:25
Date: Mon, 07 Apr 1986 10:25
33 lines
1375 bytes
1375 bytes
In article <5241@alice.uUCp> bs@alice.UUCP writes:
>
>typedef base* (*PF)(int);
>
>some_function(PF f) {
> // ...
> base* p = (*f)(2); // name a new x or y
> // ...
>}
>
That reminds me - why do I have to say
typedef int (*PF)(int);
int f ( PF f1 ) { ; }
when I mean
int f ( int (*f1)(int) ) { ; }
which says
"xx.c", line 1: error: syntax error
four times. I don't want to create a new typedef which I am going to use
once, particularly when writing an include file for others to use, so that
I have to use some obscure name to avoid conflicts.
--
UUCP: ...!mcvax!ukc!warwick!cudcv
JANET: cudcv@uk.ac.warwk.daisy
ARPA: cudcv@daisy.warwk.ac.uk
PHONE: +44 204 523037
Rob McMahon, Computer Unit, Warwick University, Coventry CV4 7AL, England
Technical Details
Message-ID:
<145@daisy.warwick.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!mcvax!ukc!warwick!cudcvReferences:
<5241@alice.uUCp>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!mcvax!ukc!warwick!cudcv From: cudcv@daisy.warwick.UUCP (Rob McMahon) Newsgroups: net.lang.c++ Subject: Re: address of constructor Message-ID: <145@daisy.warwick.UUCP> Date: Mon, 7-Apr-86 05:25:32 EST Article-I.D.: daisy.145 Posted: Mon Apr 7 05:25:32 1986 Date-Received: Thu, 10-Apr-86 00:44:28 EST References: <5241@alice.uUCp> Reply-To: cudcv@daisy.warwk.ac.uk (Rob McMahon) Organization: Computer Unit, Warwick University, UK Lines: 33