fstream question

May 24, 2010 at 2:03am
using fstream how can you open a file outside of the directory your programs running in?
May 24, 2010 at 2:25am
By listing the full location.

-Albatross
May 24, 2010 at 2:27am
Just pass a relative or absolute path that your system understands. For example, on UNIX an absolute path begins with '/', while on Windows it begins with a letter and a colon. Remember than forward slashes are accepted everywhere, so, for example, "directory/file.ext" is always a valid relative path.
May 24, 2010 at 9:50am
ok thanks, my problem was i was using a backwards slash
May 24, 2010 at 10:29am
Never forget that backslashes are written as '\\'.
Topic archived. No new replies allowed.