469,307 Members | 1,978 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,307 developers. It's quick & easy.

Portable way of obtaining current working directory......

Hi,

I'm working on a portable ANSI C++ application designed to compile and
execute under Windows and LINUX/UNIX.

Is there a portable way of obtaining the current working directory? Sorry,
if I'm being stupid...

Thanks,

Shaun
Jul 22 '05 #1
6 5132
Shaun Heveron wrote:
I'm working on a portable ANSI C++ application designed to compile and
execute under Windows and LINUX/UNIX.

Is there a portable way of obtaining the current working directory? Sorry,
if I'm being stupid...


You're not being stupid, you're just being in the wrong newsgroup.
I'd recommend asking in both Windows (comp.os.ms-windows.programmer)
and Linux (comp.os.linux.development.apps) newsgroups. If you care
about UNIX, you'd have to extend your search to the appropriate UNIX
newsgroup too.

The trouble is, C++ doesn't have any way of obtaining "current" or
"working" directory because it doesn't have the concept of 'a directory'.

V

Jul 22 '05 #2
Victor Bazarov wrote:
Shaun Heveron wrote:
I'm working on a portable ANSI C++ application designed to compile and
execute under Windows and LINUX/UNIX.

Is there a portable way of obtaining the current working directory?
Sorry, if I'm being stupid...


You're not being stupid, you're just being in the wrong newsgroup.
I'd recommend asking in both Windows (comp.os.ms-windows.programmer)
and Linux (comp.os.linux.development.apps) newsgroups. If you care
about UNIX, you'd have to extend your search to the appropriate UNIX
newsgroup too.

The trouble is, C++ doesn't have any way of obtaining "current" or
"working" directory because it doesn't have the concept of 'a directory'.

V


Take a look here:

http://tinf2.vub.ac.be/~dvermeir/software/dv/index.html
Jul 22 '05 #3
Lieven wrote:
Victor Bazarov wrote:
Shaun Heveron wrote:
I'm working on a portable ANSI C++ application designed to compile and
execute under Windows and LINUX/UNIX.

Is there a portable way of obtaining the current working directory?
Sorry, if I'm being stupid...


You're not being stupid, you're just being in the wrong newsgroup.
I'd recommend asking in both Windows (comp.os.ms-windows.programmer)
and Linux (comp.os.linux.development.apps) newsgroups. If you care
about UNIX, you'd have to extend your search to the appropriate UNIX
newsgroup too.

The trouble is, C++ doesn't have any way of obtaining "current" or
"working" directory because it doesn't have the concept of 'a directory'.

V


Take a look here:

http://tinf2.vub.ac.be/~dvermeir/software/dv/index.html


And especially this will interest you:

http://tinf2.vub.ac.be/~dvermeir/sof...Directory.html
Jul 22 '05 #4
Lieven wrote:
Lieven wrote:

Victor Bazarov wrote:

Shaun Heveron wrote:
[...]
V


Take a look here:

http://tinf2.vub.ac.be/~dvermeir/software/dv/index.html

And especially this will interest you:

http://tinf2.vub.ac.be/~dvermeir/sof...Directory.html


Next time you might consider replying directly to the original poster.
Jul 22 '05 #5

"Shaun Heveron" <fr**@fred.com> wrote in message
news:41***********************@news.zen.co.uk...
Hi,

I'm working on a portable ANSI C++ application designed to compile and
execute under Windows and LINUX/UNIX.

Is there a portable way of obtaining the current working directory? Sorry,
if I'm being stupid...


See http://www.boost.org/libs/filesystem/doc/index.htm which supports
windows and POSIX file systems in a semi-portable fashion.

Jeff F
Jul 22 '05 #6
Victor Bazarov wrote:
Lieven wrote:
Lieven wrote:

Victor Bazarov wrote:
Shaun Heveron wrote:
[...]
V

Take a look here:

http://tinf2.vub.ac.be/~dvermeir/software/dv/index.html

And especially this will interest you:

http://tinf2.vub.ac.be/~dvermeir/sof...Directory.html
Next time you might consider replying directly to the original poster.


Sorry for the mistake, pretty new to newsgroups.
Jul 22 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Marek Kotowski | last post: by
5 posts views Thread by Mario Rodriguez | last post: by
1 post views Thread by Tony | last post: by
5 posts views Thread by zion_zii | last post: by
3 posts views Thread by Chris Mellon | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.