🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: de.comp.lang.c++
Article #2161

Re: typedef in einem Makro

#2161
From: Frank Nobis
Date: Wed, 17 Apr 1996 13:26
29 lines
1158 bytes
Bernhard Ruch <Bernhard.Ruch@studi.epfl.ch> writes:

> 
> Ist es moeglich, folgendes Problem mit Makros zu loesen?
>
Ja, ist es.
 
> Ich versuchte es mit folgendem Makro:
> 
> 
>     #define CLASSPOINTER(CLASSNAME) typedef CLASSNAME* CLASSNAMEPointer; \
>     int Display (CLASSNAMEPointer pCLASSNAME);
> 
>     CLASSPOINTER(Object)
> 
> 
> Das Problem ist nun, dass "CLASSNAME" in "CLASSNAMEPointer" nicht durch
> "Object" ersetzt wird

Ersetze  CLASSNAMEPointer durch CLASSNAME##Pointer

Andernfalls wird keine Ersetzung stattfinden.

Grusß
	Frank
-- 
 Frank Nobis				Email: fn@Radio-do.de  PGP AVAILABLE
 Landgrafenstr. 130			dg3dcn   http://www.radio-do.de/~fn/
 44139 Dortmund	    Powered by FreeBSD  Fax: +49 231 7213816
Technical Details
Message-ID: <ygelojv6kwy.fsf@trinity.radio-do.de>
Path: arc1-ca.pugleaf.net!trinity.radio-do.de!not-for-mail
References: <3174CB7F.41C6@studi.epfl.ch>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!trinity.radio-do.de!not-for-mail
From: Frank Nobis <fn@trinity.radio-do.de>
Newsgroups: de.comp.lang.c++
Subject: Re: typedef in einem Makro
Date: 17 Apr 1996 15:26:55 +0200
Organization: Radio and Friends
Message-ID: <ygelojv6kwy.fsf@trinity.radio-do.de>
References: <3174CB7F.41C6@studi.epfl.ch>
NNTP-Posting-Host: trinity.radio-do.de
X-Newsreader: September Gnus v0.68/Emacs 19.30