Author: Russell Reagan
Date: 14:16:27 12/23/02
Go up one level in this thread
On December 23, 2002 at 16:20:48, Sune Fischer wrote: >The only way to inline is to write the whole function inside the header >file in the class, why is that? Isn't there a way to just have the prototype in >the class, and have the inlined function written in the cpp file? >What good is cpp files then, seems I only ever need headers??? Another way to think of it is to think of inlined functions working just like a macro. If you wrote a macro in a source file, then tried to use that macro in a seperate source file, the compiler is going to say, "I don't see no macro." But that same macro will work fine in the file that you wrote it in.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.