Re: RES: It's possible to use folder/file path for #define (like is possible to use folder/file path into #indude statement) ? If yes, why ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luiz,

> #define FOO "my/dir/bar.txt" , means "replace FOO" for text
> "my/dir/bar.txt" or for bar.txt content ?

It means replace the identifier token FOO with the text (including the
quotes) "my/dir/bar.txt".

To insert the contents of "my/dir/bar.txt" into your source code, use:
#include "my/dir/bar.txt"

If FOO is defined as "my/dir/bar.txt", this will also work:

#include FOO

...but doing so is unusual, and not generally recommended.

Note:  these are not GCC particular questions, they are C/C++ questions
(well, really, the C preprocessor itself) that should be asked on a more
appropriate forum.

Sincerely,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux