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

S

Shaun Heveron

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
 
V

Victor Bazarov

Shaun said:
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
 
L

Lieven

Victor said:
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
 
L

Lieven

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top