Mail Archives: djgpp/1997/08/04/15:18:14
On Tue, 29 Jul 1997, Joshua Eckstein wrote:
> I'm trying to find out how to specify a filename as not to be
> drive/directory specific. In other words, if someone puts the executable in
> [xfolder] and I have established a branch directory for data, it will look
> in [xfolder]\data. Like so:
>
> LoadPic ("\data\example.pic", ...);
Leave off the lead slash or back slash (use slashes for portability
DJGPP does not care) and make that:
LoadPic ("data/example.pic", ...);
This is a path relative to the applications current directory. So if
the user has CD'd to [xfolder] or the program chdir()'s to [xfolder]
this will always work.
Art S. Kagel, kagel AT bloomberg DOT com
- Raw text -