468,512 Members | 1,338 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,512 developers. It's quick & easy.

__FILE__ converstion to filename (without path)

How can I use the preprocessor functions to get the __FILE__ macro only with the filename (without the path).
The reason is that the objects are different when complied on different machines (althgouh the code has not changed).
any ideas? any alternatives will be fine as well.
Dec 23 '07 #1
1 4022
weaknessforcats
9,207 Expert Mod 8TB
The __FILE__ macro reports the path used by the preprocessor to open the file. Since you can have the same file name on different paths, it is important to know which one was used. The name you use in the #include is just the short name.
Dec 23 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by Tom | last post: by
9 posts views Thread by qazmlp | last post: by
3 posts views Thread by lauch2 | last post: by
10 posts views Thread by Brian Gruber | last post: by
2 posts views Thread by fortepianissimo | last post: by
18 posts views Thread by Lukas Ruf | last post: by
4 posts views Thread by 7stud | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.