用long getcwd(char *buf, unsigned long size);
#include <stdlib.h>
#include <stdio.h>
#define MAXPATH 128
int main()
{
char buf[MAXPATH];
getcwd(buf, MAXPATH);
printf("The current directory is :%s \n", buf);
exit(0);
}
用long getcwd(char *buf, unsigned long size);
#include <stdlib.h>
#include <stdio.h>
#define MAXPATH 128
int main()
{
char buf[MAXPATH];
getcwd(buf, MAXPATH);
printf("The current directory is :%s \n", buf);
exit(0);
}