Re: [OFF-TOPIC] Current Directory

From: Dan Merillat (harik@chaos.ao.net)
Date: 03/07/00


Julian Buckley writes:
> > Just a quick question.  Is there any way to find out what directory
> > your program is currently running in?
>
> sprintf(buf, "cd > currdir.tmp");
> system(buf);

Ugh.

try

char curdir[4096];
getcwd(curdir, 4096);

--Dan


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT