Re: [Dev-C++] rookie question... Getting the current directory
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Vlada D. <dj...@im...> - 2002-12-26 08:13:45
|
I didn't try this, but maybe it could work:
#include <stdlib.h>
void main(void)
{
test=3Dsystem("cd");
}
Since your main function is declared as void, it shouldn't return =
anything.
Vlada
----- Original Message -----=20
From: Danny Roelofs=20
To: dev...@li...=20
Sent: Thursday, December 26, 2002 2:36 AM
Subject: [Dev-C++] rookie question... Getting the current directory
Hi,
=20
Just started today picking my programming hobby after 10 years when i =
used an amiga and a whole different programming
enviroment, i feel like a rookie again in the world of programming =
with c++ with dev4 & windows.....
=20
Can someone tell me how to get the current directory, i think it would =
be something like this:
=20
string test;
=20
void main(void)
{
=20
test =3D GetCurrentDir();
=20
=20
=20
return 0;
}
=20
But ofcourse, this doesnt work.... someone.. enlighten me..
=20
i tryed all kinds of material but couldn't find something that worked =
with dev4 and i dont know where i have to find the problem.
=20
thanks for your help
=20
Danny.
|