POV-Ray : Newsgroups : povray.off-topic : C++ question... : Re: C++ question... Server Time
5 Sep 2024 17:18:03 EDT (-0400)
  Re: C++ question...  
From: Warp
Date: 13 Jun 2009 13:46:31
Message: <4a33e5f6@news.povray.org>
Fredrik Eriksson <fe79}--at--{yahoo}--dot--{com> wrote:
> > Is #include supposed to work just like a textual include?

> Yes.

  With two minor exceptions:

  1) Certain compiler-dependent #pragmas may change the behavior of #include
slightly. The most common one is "#pragma once".

  2) __FILE__ will expand to the name of the header file if it appears in
it, rather than the source file where it's #included. Likewise for __LINE__.
Thus if either identifier is used in a header file, its behavior will be
different than if you copy-pasted the contents of the header file to the
source file.
  (The exception is if either identifier is used in a preprocessor macro, in
which case they are interpreted only after expanding the macro instantiation.)

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.