🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.c++
Article #299

Re: pointers to functions returning typedefs in structures (correction)

#299
From: Brian Bershad
Date: Fri, 05 Sep 1986 07:43
37 lines
1227 bytes
---------------------------------------------------------

In a previous message I said:

>The following won't compile:

>--------------------------------
>typedef char * memory ;
>
>struct S	{
>	memory (*A)(), memory (*B)();	// this is a syntax error
};
>
>---
>but
>---
>
>struct S	{
>	memory (*A)();
>	memory (*B)();
>};
>
>
>will.


Unfortunately, the first (bad) example was not what I wanted to
say  (obviously, it won't compile)... but given:

struct S {
	memory (*A)(), (*B)();
};

(which is what I wanted to say), the compiler croaks.


	Brian 
Technical Details
Message-ID: <1199@uw-june>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!nbires!hao!hplabs!tektronix!uw-beaver!uw-june!brian
References: <1193@uw-june>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!nbires!hao!hplabs!tektronix!uw-beaver!uw-june!brian
From: brian@uw-june (Brian Bershad)
Newsgroups: net.lang.c++
Subject: Re: pointers to functions returning typedefs in structures (correction)
Message-ID: <1199@uw-june>
Date: Fri, 5-Sep-86 03:43:16 EDT
Article-I.D.: uw-june.1199
Posted: Fri Sep  5 03:43:16 1986
Date-Received: Sat, 6-Sep-86 00:02:11 EDT
References: <1193@uw-june>
Reply-To: brian@uw-june.UUCP (Brian Bershad)
Organization: U of Washington Computer Science, Seattle
Lines: 37
Keywords: pointers, functions, won't compile