线程MFC VC ++ [英] Threads MFC VC++

查看:120
本文介绍了线程MFC VC ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在执行具有2个线程(使用AfxBeginThread()创建)的代码时,在给出错误"xx.exe:0X000000C访问冲突"的程序运行时遇到问题,一个从读取文件1而另一个用于写入文件2.

有人可以帮忙吗??

I m having a problem in the runtime of a program giving error "Unhandled Exception in xx.exe:0X000000C Access Violation" while executing the code having 2 threads ( created using AfxBeginThread()), one from read a file1 and another for writing to a file2.

can anyone help out????

推荐答案

调试器启动可以帮助... :)

您将在例外处看到该行和堆栈,
只需在消息框中按重试"或中断"即可:)
A Debugger start could help... :)

You will see the line and stack at the exception,
just press "Retry" or "Break" at the message box :)


skskskskskskskss写道:
sksksksksksksks wrote:

can有人帮忙吗????

can anyone help out????



在这一点上,只有一个人可以提供帮助.你

显然,您正在代码中的某处尝试访问不是您自己的内存.这可能是取消引用未初始化的指针的结果.

您需要在代码中找到出现症状的位置,然后尝试将其追溯到犯错的位置.然后解决您的错误.最后,检查您是否在其他地方犯了同样的错误,并予以修复.

开始执行此操作的方法是按照Eugen Podsypalnikov的建议-使用调试器.



At this point there is only one person that can help. You.

Evidently, somewhere in your code you are attempting to access memory that is not yours. This could be the result of dereferencing an uninitialized pointer.

You''ll need to find the location in your code where the symptom is occurring and try to trace it back to where you made your mistake. Then fix your mistake. Finally, check if you made the same mistake in other places and fix those too.

The way to start doing this is by following Eugen Podsypalnikov suggestion - use the debugger.


这篇关于线程MFC VC ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆