当前位置:网站首页>_ FindText error
_ FindText error
2022-04-23 17:53:00 【ppipp1109】
ps: Compile environment qt + mingw32 No problem compiling ;
Switch to qt + msvc 2017_64 There's a problem ;
Error message :
Stopped in thread 0 by: Exception at 0x7ffbcfe713ad, code: 0xc0000005: write access violation at: 0xffffffffd587d380, flags=0x0 (first chance).
// Get all file names in the directory
void getFiles(string path, vector<string>& files)
{
// File handle
long hFile = 0;
// file information
struct _finddata_t fileinfo;
string p;
if ((hFile = _findfirst(p.assign(path).append("\\*").c_str(), &fileinfo)) != -1)
{
do
{
// If it's a catalog , Iterative
// If not , Join list
if ((fileinfo.attrib & _A_SUBDIR))
{
if (strcmp(fileinfo.name, ".") != 0 && strcmp(fileinfo.name, "..") != 0)
getFiles(p.assign(path).append("\\").append(fileinfo.name), files);
}
else
{
files.push_back(p.assign(path).append("\\").append(fileinfo.name));
}
} while (_findnext(hFile, &fileinfo) == 0);
_findclose(hFile);
}
}
When applying the following function , Report the error above . Tossed all afternoon , At first, I thought it was a coding format problem , The final discovery is 64 Bit compiler , The value of the feedback structure is 64 position , Defined long type hFile Will be cut off , Not right .
So will long hfile Change it to
intptr_t hFile
perhaps
long long hFIle
版权声明
本文为[ppipp1109]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230549075533.html
边栏推荐
- 2022制冷与空调设备运行操作判断题及答案
- 1217_ Generating target files using scons
- Listen for click events other than an element
- Learning record of uni app dark horse yougou project (Part 2)
- 440. The k-th small number of dictionary order (difficult) - dictionary tree - number node - byte skipping high-frequency question
- 2022江西光伏展,中国分布式光伏展会,南昌太阳能利用展
- C language implements memcpy, memset, strcpy, strncpy, StrCmp, strncmp and strlen
- Type judgment in [untitled] JS
- 122. The best time to buy and sell stocks II - one-time traversal
- 列表的使用-增删改查
猜你喜欢
92. 反转链表 II-字节跳动高频题
Welcome to the markdown editor
Theory and practice of laser slam in dark blue College - Chapter 2 (odometer calibration)
Summary of common SQL statements
极致体验,揭晓抖音背后的音视频技术
Operation of 2022 mobile crane driver national question bank simulation examination platform
JS get link? The following parameter name or value, according to the URL? Judge the parameters after
2022江西光伏展,中国分布式光伏展会,南昌太阳能利用展
On the problem of V-IF display and hiding
高德地图搜索、拖拽 查询地址
随机推荐
Matlab / Simulink simulation of double closed loop DC speed regulation system
极致体验,揭晓抖音背后的音视频技术
undefined reference to `Nabo::NearestNeighbourSearch
Compilation principle first set follow set select set prediction analysis table to judge whether the symbol string conforms to the grammar definition (with source code!!!)
Flask项目的部署详解
SystemVerilog (VI) - variable
Index: teach you index from zero basis to proficient use
41. 缺失的第一个正数
Detailed deployment of flask project
386. 字典序排数(中等)-迭代-全排列
油猴网站地址
122. 买卖股票的最佳时机 II-一次遍历
剑指 Offer 22. 链表中倒数第k个节点-快慢指针
[二叉数] 二叉树的最大深度+N叉树的最大深度
【Appium】通过设计关键字驱动文件来编写脚本
2022年广东省安全员A证第三批(主要负责人)特种作业证考试题库及在线模拟考试
列錶的使用-增删改查
C1小笔记【任务训练篇一】
The JS timestamp of wechat applet is converted to / 1000 seconds. After six hours and one day, this Friday option calculates the time
1217_ Generating target files using scons