delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/08/30/07:00:05

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: inline
Date: 29 Aug 2002 08:43:28 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 22
Message-ID: <akkmrg$e7h$1@nets3.rz.RWTH-Aachen.DE>
References: <Xns927961B9FE2B4raf256com AT 213 DOT 180 DOT 128 DOT 20>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 1030610608 14577 137.226.32.75 (29 Aug 2002 08:43:28 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 29 Aug 2002 08:43:28 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Rafal 'Raf256' Maj <rafal AT raf256 DOT com> wrote:
> Hi,
> I have project with several files. When class is in .h (declaration) and in 
> .cpp (definition) - then I can not use inline methods. 

Right, you can't.  Get out your C++ textbook again and read how inline
is supposed to be used.

Inline requires the code to be in the header.  Right in the class
definition itself, actually, if memory serves:

> --- test.h ---
> class cTest {
>   public :
>     inline void fun() {
	  /* code here */
      };
> };

-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019