quote:I suppose I should point out that C-Junkie didn''t say anything about keeping the executable and data in the same directory specifically. He said not to rely on it (Windows-ism), and to figure out how Unix applications insulate themselves from environmental differences instead.
Original post by YoshiN
And C-Junkie, I really don''t need your holier-than-thou attitude. I have my reasons for keeping the file in the same directory, and if you don''t like it I can tell you where to cram it.
Details.
Oh, and Windows is "teh suck."
Seriously, though, there''s a reasong argv[0] gives you the path to the executable. That''s your portable solution right there. And did you know that Unix-style path separators work in C on any platform? Say goodbye to "\\" once and for all.