FINDFIRS.CPP
资源名称:dos_gui.zip [点击查看]
上传用户:wtrl82617
上传日期:2007-01-07
资源大小:187k
文件大小:0k
源码类别:
界面编程
开发平台:
DOS
- /* findfirst and findnext example */
- #include <stdio.h>
- #include <dir.h>
- #include <ERRNO.H>
- int main(void)
- {
- struct ffblk ffblk;
- int done;
- char a[255];
- printf("Directory listing of n");
- scanf ("%s",a);
- done = findfirst(a,&ffblk,0);
- while (!done)
- {
- printf(" %sn", ffblk.ff_name);
- done = findnext(&ffblk);
- }
- int b=ENOENT;
- printf ("ENOENT=%d",b);
- return 0;
- }