当前位置:网站首页>_ 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
边栏推荐
- Open source key component multi_ Button use, including test engineering
- MySQL进阶之索引【分类,性能分析,使用,设计原则】
- 198. Looting - Dynamic Planning
- 2022江西储能技术展会,中国电池展,动力电池展,燃料电池展
- Oil monkey website address
- MySQL advanced index [classification, performance analysis, use, design principles]
- 402. 移掉 K 位数字-贪心
- 列錶的使用-增删改查
- 470. 用 Rand7() 实现 Rand10()
- Sword finger offer 22 The penultimate node in the linked list - speed pointer
猜你喜欢

JS high frequency interview questions

Chrome浏览器的跨域设置----包含新老版本两种设置

102. 二叉树的层序遍历

Flask项目的部署详解

2022江西储能技术展会,中国电池展,动力电池展,燃料电池展

Go的Gin框架学习

Operation of 2022 mobile crane driver national question bank simulation examination platform

Hcip fifth experiment

Anchor location - how to set the distance between the anchor and the top of the page. The anchor is located and offset from the top

Laser slam theory and practice of dark blue College Chapter 3 laser radar distortion removal exercise
随机推荐
JS parsing and execution process
Index: teach you index from zero basis to proficient use
剑指 Offer 03. 数组中重复的数字
Add animation to the picture under V-for timing
ros常用的函数——ros::ok(),ros::Rate,ros::spin()和ros::spinOnce()
Tdan over half
Chrome浏览器的跨域设置----包含新老版本两种设置
Halo 开源项目学习(二):实体类与数据表
Learning record of uni app dark horse yougou project (Part 2)
2022 judgment questions and answers for operation of refrigeration and air conditioning equipment
2022江西储能技术展会,中国电池展,动力电池展,燃料电池展
Go对文件操作
Comparison between xtask and kotlin coroutine
JS forms the items with the same name in the array object into the same array according to the name
C language implements memcpy, memset, strcpy, strncpy, StrCmp, strncmp and strlen
31. Next arrangement
SystemVerilog (VI) - variable
Examination question bank and online simulation examination of the third batch (main person in charge) of special operation certificate of safety officer a certificate in Guangdong Province in 2022
Remember using Ali Font Icon Library for the first time
Go's gin framework learning