Re: [Dev-C++] Need help with "directory"
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <qa...@ho...> - 2002-10-14 11:37:06
|
At last I found it..
#include <unistd.h>
char *getcwd(char *buf, size_t size);
Hopefully this helps someone else :-)
/J=F6rgen
*********** REPLY SEPARATOR ***********
On 2002-10-14 at 12:05 J=F6rgen wrote:
Hi again list.
I want to know how to obtain the absolute path of the current directory.
In java I can write something like this
File curDir =3D new File(".");
String curDirPath =3D curDir.getAbsolutePath();
How do I do this in c++? I've searched google and various other resources=
but have found nothing of use (or it could be me that is blind)
I'm writing a console application that I run both at home (windows) and in=
school (unix) so if it is possible to use the same code it would be great.
Regards,
/J=F6rgen
|