Hi. I'm trying to write a program which loads a file from within the directory structure of a macintosh. Because they use colons instead of backslash, I thought that this code would work:
#include <stdio.h>
FILE *infile;
infile = fopen("The Cube:Users:davidparker:Desktop:Bills
Stuff:Majbook-J01:J-200220ubs","r");
But it doesn't. It reads the entire thing as the name of the file, and assumes it's in the root directory. I.e. it does not read the colon in the string as a directory flag - merely as part of the name.
I tried something like 12 different possibilities, but nothing seemed to work.
If anybody knows either how I can solve this, or where I should be looking, I would be v grateful.
Cheers,
Bill