Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / General Programming / getcwd not working in Visual C++ Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
JosephDuchesne

March 03, 2005, 05:03 PM

Hi, this is a source file that works fine in DevCpp, but fails completely in Visual C++. The VC++ doesn't have unistd.h anywhere, and my attempts to move it to from devcpp didn't work. Here is the source code:

#include
#include
#include
#include
#include

extern char RootPath[2048];

void loadPlatformDep()
{
printf("Windows platform detected...n");
getcwd(RootPath, 2048);
printf("The URL: %sn",RootPath);
}

and the error:
C:Program FilesMicrosoft Visual StudioMyProjectsMadTakwin_dep.h(12) : warning C4013: 'getcwd' undefined; assuming extern returning int

 
Reedbeta

March 03, 2005, 05:22 PM

In VC++, the function is called _getcwd.

A brief search in the MSDN would've answered this question for you.

 
This thread contains 2 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.