Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!julius.cs.uiuc.edu!apple!agate!shelby!neon!pescadero.Stanford.EDU!philip From: philip@pescadero.Stanford.EDU (Philip Machanick) Newsgroups: comp.lang.c++ Subject: Re: Inline member functions in .c file Message-ID: <1991Jan2.230030.27020@Neon.Stanford.EDU> Date: 2 Jan 91 23:00:30 GMT References: <1990Dec31.183500.1370@athena.mit.edu> Sender: news@Neon.Stanford.EDU (USENET News System) Reply-To: philip@pescadero.stanford.edu Organization: Computer Science Department, Stanford University Lines: 14 In article , cimshop!davidm@uunet.UU.NET (David S. Masterson) writes: |> A::xx() needs to be declared as inline in A.h or it will be treated as |> "outline". Also, you'll probably want to put the definition of the A::xx() in |> the .H file or programs including A.h will not be able to find it (since it's |> resolved by CPP). Not strictly true. As long as the inline declaration is seen by the compiler before a call, there's no problem. Inlines are expanded statically, but can appear anywhere in the source. One technique is to have a separate A.i file, which you include after the A.h - this allows you to make inlines which reference more than one class, for example. (Not sure what you mean by "resolved by CPP": presumably, you meant cfront?) -- Philip Machanick philip@pescadero.stanford.edu