Hi,
When I create a bash shell script, and there are user defined constants needed, I like to create constants that build on each other. For example:
Code:
readonly base_path="/home/somehere/"
readonly user_filename="${base_path}some_file.txt"
readonly log_filename="${base_path}log_file.txt"
Which allows the user to change 'base_path' to what they need, but updates two (or more) variables. Less chance the user screws up or forgets one of them.
Is this at all possible in C with '#define'? And if so, how? I'm not having much luck with my searches.
Ty.