GETDIR.CPP
资源名称:C++100.rar [点击查看]
上传用户:wszmarenbt
上传日期:2013-04-26
资源大小:2552k
文件大小:0k
源码类别:
Windows编程
开发平台:
Visual C++
- #include<stdio.h>
- #include<direct.h>
- #include<dir.h>
- #include<process.h>
- #include<stdlib.h>
- #include<conio.h>
- void main()
- {
- char PATHNAME[100];
- if(getcwd(PATHNAME,100)==NULL)
- {
- printf("0:get current directory error!n");
- exit(1);
- }
- printf("The current directory is %sn",PATHNAME);
- getch();
- }