Question 19.32

How can I automatically locate a program's configuration files in the same directory as the executable?


It's hard; see also question 19.31. Even if you can figure out a workable way to do it, you might want to consider making the program's auxiliary (library) directory configurable, perhaps with an environment variable. (It's especially important to allow variable placement of a program's configuration files when the program will be used by several people, e.g. on a multiuser system.)


Read sequentially: prev next up top


This page by Steve Summit // Copyright 1995 // mail feedback