Hey,

I am trying to open a file with a relative pathname:
e.g. file=fopen("/files/index.html");
where the files directory is in the same location as the executable.
For some reason the executable cannot locate the file. Why?

Thanks, Elise

[Edit]

OK it works without the initial slash in the path name but I can't figure out how to remove it from the char[]?

Thanks, but I figured it out. Elise

Thanks, but I figured it out. Elise

What was it? :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.