// consider that macro PARENT defined when compiling using preprocessor options
string filepath = PARENT + "rest/of/the/path";
// or something like this
open(PARENT + "rest/of/the/path")
Because I want it to be decided by configuration script. I have made configuration script to put something like this on the command line when compiling:
g++ -DPARENT="/usr/local/share" ...(rest of the options goes here)
Edit: I am getting the location of data files like this, so that my program know where to look for. Since location of data files depends on options passed to ./configure script, it is the only way I could know about my data files (e.g. images, sounds and stuff.)