By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,028 Members | 1,784 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,028 IT Pros & Developers. It's quick & easy.

passing filepath from another file

P: 1
I want to avoid hardcoding the filepath in my C program. I want to store the filepath in a variable in a text file. then i have to pass that variable to another file. ex. "$ADE_VIEW_ROOT/a/b/c/a.txt" . Im executing C files in Linux env.
If anyone knows pls help me.
Nov 11 '08 #1
Share this Question
Share on Google+
2 Replies

P: 13,264
So what exactly do you need help with here? Have you tried the code and got an error?
Nov 11 '08 #2

Expert 100+
P: 2,400
This sort of scheme works for run-time determination of the file path. It won't work at compile-time (for #include). You didn't say which you were trying to achieve.
Nov 11 '08 #3

Post your reply

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