当前位置:网站首页>_ 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
边栏推荐
- Double pointer advanced -- leetcode title -- container with the most water
- Gets the time range of the current week
- 394. 字符串解码-辅助栈
- 2022 Shanghai safety officer C certificate operation certificate examination question bank and simulation examination
- 198. Looting - Dynamic Planning
- .104History
- [appium] write scripts by designing Keyword Driven files
- Sword finger offer 22 The penultimate node in the linked list - speed pointer
- C1 notes [task training chapter I]
- Add drag and drop function to El dialog
猜你喜欢

01 - get to know the advantages of sketch sketch

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

470. Rand10() is implemented with rand7()

Allowed latency and side output

The ultimate experience, the audio and video technology behind the tiktok

Kubernetes service discovery monitoring endpoints

On the method of outputting the complete name of typeID from GCC

Eigen learning summary

Go's gin framework learning

Element calculation distance and event object
随机推荐
干货 | 快速抽取缩略图是怎么练成的?
Click Cancel to return to the previous page and modify the parameter value of the previous page, let pages = getcurrentpages() let prevpage = pages [pages. Length - 2] / / the data of the previous pag
QT modification UI does not take effect
48. Rotate image
Operation of 2022 mobile crane driver national question bank simulation examination platform
440. The k-th small number of dictionary order (difficult) - dictionary tree - number node - byte skipping high-frequency question
ros常用的函数——ros::ok(),ros::Rate,ros::spin()和ros::spinOnce()
Exercise: even sum, threshold segmentation and difference (two basic questions of list object)
92. Reverse linked list II byte skipping high frequency question
MySQL advanced index [classification, performance analysis, use, design principles]
高德地图搜索、拖拽 查询地址
Kubernetes service discovery monitoring endpoints
Go语言JSON包使用
239. 滑动窗口最大值(困难)-单向队列、大顶堆-字节跳动高频题
[二叉数] 二叉树的最大深度+N叉树的最大深度
In JS, t, = > Analysis of
油猴网站地址
ES6
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
2021长城杯WP