473,231 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

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 5356
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Marek Kotowski | last post by:
The problem: I'd like to build – with PHP – a background-image url on a server (Apache) (url itself or a full directory name). I'd like to use a portable mechanism, I mean a PHP script should...
5
by: Mario Rodriguez | last post by:
Hi people, Does anyone have some idea how to get the password of an active directory user? I tried using the DirectorySearcher object to find the user and the DirectoryEntry.Password property to...
1
by: Tony | last post by:
Guys How do I find the directory that my current application is running in? e.g. if i wanted to find the current working directory of regedit internally (i.e. within the regedit program) it...
0
by: VP | last post by:
Hi there, well i am stuck on a problem with regards to obtaining security permissions on folders. At the moment I have created a simple treeview example which shows all sub-directories in a tree...
4
by: Jeff | last post by:
I feel like I should have been able to figure this out but I can't seem to find any references on this topic. It seems like my current working directory is consistently a few directories up from...
5
by: zion_zii | last post by:
Im working on an embedded project and i have to obtain individual digits from a byte thats the output of a device. Im trying to output this info to an LCD and need to convert it to ASCII first. I...
3
by: Chris Mellon | last post by:
This appears to be a change in behavior from Python 2.4 to Python 2.5, which I can't find documented anywhere. It may be windows only, or related to Windows behavior. In 2.4, the current...
3
by: duyanning | last post by:
I have written a pyhton script that will process data file in current working directory. My script is in an different directory to data file. When I debug this script using pdb within emacs, emacs...
2
by: Kakkanattu | last post by:
Hi, In desktop application, we use different ways to get the current execution directory. I. AppDomain.CurrentDomain.BaseDirectory II. Environment.CurrentDirectory...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.