The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM



Thread: Help
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 05-04-2008
redhead's Avatar
redhead redhead is offline
Registered User
 

Join Date: Feb 2002
Location: Denmark
Posts: 46
If you want to use some system environments, then the getenv(3) system call would be preferede:
Code:
  #include <stdlib.h>
  char *getenv(const char *name);
If it's something like the current directory, getcwd(3) might be what you're looking for
Code:
  #include <unistd.h>
  char *getcwd(char *buf, size_t size);
  char *get_current_dir_name(void);
  char *getwd(char *buf);
Reply With Quote