谁能告诉我,这到底是为什么,同样代码,结果却不同
谁能告诉我,这到底是为什么,同样代码,结果却不同程序代码:
#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; }