Woah! I just re-read that...
>
> When I run it, the file test.txt is written to the root directory '/'
> instead of my desktop.
And it manages to write to '/' ???
Does that mean you are running as root (or a privileged user anyway)
on this system?
You *really* do not want to be doing that.
> I tried fopen("./test.txt", "w") but the file still went to the root
> directory.
Sure '.' just means "here", and is computed relative to CWD. The Aqua
WM starts with CWD set to '/'...
> I also tried fopen("~/Desktop/test.txt", "w") but that crashed the
> program.
Yes '~' is translated as "HOME", but is only valid if HOME is set.
Which will be the case in a shell, but not for the window manager,
usually, on OSX.
> I'm using fltk 1.1.7 on Mac OS X Tiger.
1.1.8 is out (and better than 1.1.7) and there are even 1.1.9 release
candidates on the website now...
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk