|
本帖最后由 zmrghy 于 2022-5-29 02:08 编辑
谁能告诉我,这到底是为什么,同样代码,结果却不同
- #include<stdio.h>
- #include<string>
- #include<io.h>
- int main()
- {
- std:: string inpath = "E:\\c语言视频教程\\Download\\*.*";
- long handle;
- struct _finddata_t fileinfo;
- handle=_findfirst(inpath.c_str(),&fileinfo);
- if (handle == -1)
- return -1;
- do
- {
- printf("%s\n", fileinfo.name);
- } while (!_findnext(handle,&fileinfo));
- _findclose(handle);
- return 0;
- }
复制代码 |
上一篇: |error: 'filesystem' in namespace 'std' does not name a type下一篇: 把文件大小转换成MB或者GB为单位,带两位小数的字符串如何实现
|