见鬼了,客户端JavaMail-1.4偶尔出现 DEBUG SMTP: QUIT failed with 250 [问题点数:200分,结帖人sboom]

Bbs4
本版专家分:1898
结帖率 99.6%
Bbs8
本版专家分:43828
Blank
铜牌 2010年1月 总版技术专家分月排行榜第三
Blank
红花 2010年5月 Java大版内专家分月排行榜第一
2010年2月 Java大版内专家分月排行榜第一
2010年1月 Java大版内专家分月排行榜第一
2010年1月 Oracle大版内专家分月排行榜第一
2009年12月 Java大版内专家分月排行榜第一
2009年12月 Oracle大版内专家分月排行榜第一
Blank
蓝花 2010年2月 Oracle大版内专家分月排行榜第三
Bbs4
本版专家分:1898
Bbs2
本版专家分:196
Bbs2
本版专家分:222
Bbs7
本版专家分:12459
Bbs10
本版专家分:135028
Blank
探花 2008年 总版技术专家分年内排行榜第三
Blank
金牌 2008年2月 总版技术专家分月排行榜第一
2008年1月 总版技术专家分月排行榜第一
Blank
铜牌 2008年7月 总版技术专家分月排行榜第三
2008年6月 总版技术专家分月排行榜第三
Blank
红花 2009年7月 Java大版内专家分月排行榜第一
2008年9月 Java大版内专家分月排行榜第一
2008年8月 Java大版内专家分月排行榜第一
2008年7月 Java大版内专家分月排行榜第一
2008年6月 Java大版内专家分月排行榜第一
2008年5月 Java大版内专家分月排行榜第一
2008年3月 Java大版内专家分月排行榜第一
2008年2月 Java大版内专家分月排行榜第一
2008年1月 Java大版内专家分月排行榜第一
2007年12月 Java大版内专家分月排行榜第一
Bbs4
本版专家分:1898
Bbs2
本版专家分:210
Bbs2
本版专家分:245
Bbs7
本版专家分:26325
Blank
银牌 2009年10月 总版技术专家分月排行榜第二
Blank
红花 2009年10月 Java大版内专家分月排行榜第一
Blank
黄花 2009年11月 Java大版内专家分月排行榜第二
Bbs4
本版专家分:1276
Bbs1
本版专家分:57
Bbs7
本版专家分:11043
Bbs4
本版专家分:1884
Bbs2
本版专家分:210
Bbs4
本版专家分:1898
Bbs8
本版专家分:43828
Blank
铜牌 2010年1月 总版技术专家分月排行榜第三
Blank
红花 2010年5月 Java大版内专家分月排行榜第一
2010年2月 Java大版内专家分月排行榜第一
2010年1月 Java大版内专家分月排行榜第一
2010年1月 Oracle大版内专家分月排行榜第一
2009年12月 Java大版内专家分月排行榜第一
2009年12月 Oracle大版内专家分月排行榜第一
Blank
蓝花 2010年2月 Oracle大版内专家分月排行榜第三
Bbs1
本版专家分:0
Bbs1
本版专家分:16
使用CButtonST的时候出现debug asserion failed
先创建了一个按钮,再把CButton改成CButtonSTrn但是在执行rn m_bt.SubclassDlgItem(IDC_BUTTON1,this);rn语句后<em>出现</em>assertrn忽略后可以运行的。rn请问这是什么问题啊? 谢谢各位。
连接Access数据库出现Debug Assertion Failed
连接Access数据库<em>出现</em>Debug Assertion Failed,<em>出现</em>终止,重试,忽略三个按钮,按忽略之后,就可以到下一个界面了
程序运行出现Debug Assertion Failed错误
Loaded symbols for 'E:\test\辽宁石油化工大学教职工信息管理系统\Debug\辽宁石油化工大学教职工信息管理系统.exe'rnLoaded 'C:\WINDOWS\system32\ntdll.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.rnLoaded symbols for 'C:\WINDOWS\system32\MFC42D.DLL'rnLoaded symbols for 'C:\WINDOWS\system32\MSVCRTD.DLL'rnLoaded 'C:\WINDOWS\system32\gdi32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\user32.dll', no matching symbolic information found.rnLoaded symbols for 'C:\WINDOWS\system32\MFCO42D.DLL'rnLoaded 'C:\WINDOWS\system32\ole32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\msvcrt.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\advapi32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\rpcrt4.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\oleaut32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\imm32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\lpk.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\usp10.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\mfc42loc.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\uxtheme.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\Downloaded Program Files\CnsMin.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\shlwapi.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\netapi32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\version.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\MSCTF.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\clbcatq.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\comres.dll', no matching symbolic information found.rnLoaded 'C:\Program Files\Common Files\System\ado\msado15.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\msdart.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\comctl32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\comdlg32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\shell32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\xpsp2res.dll', no matching symbolic information found.rnLoaded 'C:\Program Files\Common Files\System\Ole DB\oledb32.dll', no matching symbolic information found.rnLoaded 'C:\Program Files\Common Files\System\Ole DB\oledb32r.dll', no matching symbolic information found.rnLoaded 'C:\Program Files\Common Files\System\Ole DB\msdasql.dll', no matching symbolic information found.rnLoaded 'C:\Program Files\Common Files\System\Ole DB\msdatl3.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\odbc32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\odbcint.dll', no matching symbolic information found.rnLoaded 'C:\Program Files\Common Files\System\Ole DB\msdasqlr.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\mswstr10.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\comsvcs.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\mtxclu.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\wsock32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\ws2_32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\ws2help.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\colbact.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\secur32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\clusapi.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\resutils.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\userenv.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\sqlsrv32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\sqlunirl.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\winspool.drv', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\nddeapi.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\sqlsrv32.rll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\odbccp32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\dbnetlib.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\security.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\msv1_0.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\iphlpapi.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\ntdsapi.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\dnsapi.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\wldap32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\crypt32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\msasn1.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\mswsock.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\hnetcfg.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\wshtcpip.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\winrnr.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\rasadhlp.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\dbnmpntw.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\MSCTFIME.IME', no matching symbolic information found.rnLoaded 'C:\Program Files\Rising\AntiSpyware\ieprot.dll', no matching symbolic information found.rnLoaded 'C:\Program Files\Common Files\System\ado\msadrh15.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\apphelp.dll', no matching symbolic information found.rnThe thread 0xBD8 has exited with code 0 (0x0).rnThe thread 0x36C has exited with code -2147483645 (0x80000003).rnThe thread 0x894 has exited with code -2147483645 (0x80000003).rnThe thread 0x464 has exited with code -2147483645 (0x80000003).rnThe thread 0xFFC has exited with code -2147483645 (0x80000003).rnThe thread 0xB4 has exited with code -2147483645 (0x80000003).rnThe program 'E:\test\辽宁石油化工大学教职工信息管理系统\Debug\辽宁石油化工大学教职工信息管理系统.exe' has exited with code -2147483645 (0x80000003).rn我是VC新手rn望各位大人帮忙解决?
用CButtonST出现Debug Assertion Failed问题
Debug通过了,但是运行程序的时候提示 Debug Assertion Failed rnrn如果忽略的话可以继续运行rnrn在wincore.cpp 的rnrn320行 ASSERT(m_hWnd == NULL); rn rn321行 ASSERT(FromHandlePermanent(hWndNew) == NULL);rnrn3866行 ASSERT(oldWndProc != (WNDPROC)AfxGetAfxWndProc());rnrn在btnst.cpp rnrn167行 ASSERT(m_nTypeStyle != BS_OWNERDRAW); rnrn请高手多指点一二,说个方法,思路也行,非常感谢rnrn
编译时出现Debug Assertion Failed,如何解决?
vs205,编译时<em>出现</em>Debug Assertion Failed如何解决.rnrn如何确定具体代码。
删除对象时出现Debug Assertion Failed
[code=c]#include rnrnusing namespace std;rnrnclass Line rn private :rn double length;rn public :rn double getLen();rn void setLen(double length);rn Line(double length);rn ~Line()rn rn cout << "Object is delete . " << endl;rn rn;rnrnint main() rnrn Line line (10.00);rn cout << "Length of line : " << line.getLen() << endl;rn line.setLen(5.98);rn cout << "Cut to : " << line.getLen() << endl;rn Line line2(20.00);rn rn delete &line;rn delete &line2;rn system("pause");rn return 0;rnrnrninline double Line::getLen()rnrn return length;rnrnrninline void Line::setLen(double length)rnrn this->length = length;rnrnrninline Line::Line(double length)rnrn cout << "----------Create an line----------" << endl;rn this->length = length;rnrn[/code]rn运行时出错:rn[img=https://img-bbs.csdn.net/upload/201608/16/1471340958_19959.png][/img]rnrn初学C++ , 求解答
为什么调试出现 “Debug Assertion Failed”错误
我先做了一个dll(有关socket得),然后用一个exe进行调试,结果<em>出现</em>“Debug Assertion Failed---sockcore.cpp 551 lines”这是为什么?谢谢了!
AsyncSelect(FD_WRITE) 出现 Debug Assertion Failed
情况1:<em>出现</em>Debug Assertion Failed错误。rnrn建立一个新线程,进行通信传输数据,rnCWinThread* Uthread = AfxBeginThread(UpDateThread,(LPVOID)this,THREAD_PRIORITY_NORMAL,0,0,NULL);rn在执行到AsyncSelect(FD_WRITE);时,<em>出现</em>Debug Assertion Failed错误。rnrn情况2:不<em>出现</em>Debug Assertion Failed错误。正常运行。rnrn不建立新线程,利用对话框的线程进行传输数据,虽然能正常运行,但是数据很多,对话框跟死了一样。rnrn所以,想建立一个传输用的线程,但是<em>出现</em>错误。rn请教,为什么在新线程里面执行就会<em>出现</em>错误呢?rn
在运行MFC程序出现debug assertion failed”窗口
[img=https://img-bbs.csdn.net/upload/201410/25/1414210186_207820.png][/img]
vs2010运行出现Debug Assertion Failed
是一个winpcap程序rnrnvoid CPage1::OnBnClickedButstart()rnrnrn // TODO: 在此添加控件通知处理程序代码rn //找到被选择的网卡rn for(inum=0;inumGetSel(inum))rn rn for(d=alldevs,i=0;inext,i++);rn rnrn rn //打开网卡设备rn if((adhandle=pcap_open_live(d->name, //设备名称rn 65536,//捕获全部的数据包rn 1, //设置网卡为混杂模式rn 1000, //读超时为1秒rn errbuf //错误缓存rn ))==NULL)rn rn AfxMessageBox(_T("不能打开网卡。"));rn //释放设备列表rn pcap_freealldevs(alldevs);rn rn rn //检测链接层,只支持以太网模式rn if(pcap_datalink(adhandle)!=DLT_EN10MB)rn rn AfxMessageBox(_T("此程序只能运行在以太网上。\n"));rn pcap_freealldevs(alldevs);rn rn if(d->addresses!=NULL)rn rn //返回接口的第一个地址的掩码rn netmask=((struct sockaddr_in*)(d->addresses->netmask))->sin_addr.S_un.S_addr;rn rn elsern //如果没有掩码,则默认设置为C类rn netmask=0xffffff;rn rn //选择过滤包类型rn CFilter filter1;rn switch(filter1.m_pro_all)rn rn case 0:rn strcpy(packet_filter,"ip");rn break;rn case 1:rn strcpy(packet_filter,"ip");rn break;rn case 2:rn strcpy(packet_filter,"ip and tcp");rn break;rn case 3:rn strcpy(packet_filter,"ip and udp");rn break;rn case 4:rn strcpy(packet_filter,"ip and icmp");rn break;rn default:rn break;rn rn //编译过滤器rn if(pcap_compile(adhandle,&fcode,packet_filter,1,netmask)ver_ihl & 0xf) * 4;rnrn //sprintf(string1,"%s ",check_protocol(ih->proto));rnrn // 输出源地址IP和目的地址IPrn sprintf(string1,"协议:%s %d.%d.%d.%d -> %d.%d.%d.%d ",rn check_protocol(ih->proto),rn ih->saddr.byte1,rn ih->saddr.byte2,rn ih->saddr.byte3,rn ih->saddr.byte4,rn ih->daddr.byte1,rn ih->daddr.byte2,rn ih->daddr.byte3,rn ih->daddr.byte4rn );rn //CString string3(string1);rn //string3.Format(_T("%s"),string1);//把char*类型转换为CString类型rn string3=string1;rn pthis->decode_ip((char*)(pkt_data+14+ip_len),ih->proto);//******在回调函数中使用类的成员函数rn //printf("\n");rnrn我感觉好像是sprintf那出错了,可是语法明明是对的啊?这是怎么回事呢?rn[img=http://img.my.csdn.net/uploads/201211/08/1352365150_7675.png][/img]rn请大家帮我解答下啊!谢谢了
串口程序,出现debug assertion failed
使用MSComm控件做的一个读串口数据,进行分析的小程序,但数据是实时大量数据,持续接收的。 rn直接运行程序正常,但在界面被网页或其他程序覆盖或显示时,弹出“<em>debug</em> assertion <em>failed</em>”.点“忽略”,则可以继续使用软件。 rnrnas following: rn```````````````````````````````````````````````````````` rnDebug Assertion Failed! rnrnProgram: ..path...\xxxx.exe rnFile:afxole.inl rnLine:277 rnrnFor information on how your program can cause an assertion failure, see the visual c++ documentation on asserts. rnrnrnrn:查看堆栈,怀疑是COleSafeArray类型变量的问题, 大侠们给予指点,谢谢了!rn
vc中出现debug assertion failed
马上考机试了,<em>出现</em>这种状况怎么办?急急急!!!rnDebug assertion <em>failed</em>!rnProgram:D:\WEXAM\24301001\Debug\prog1.exernFile:fgets.crnLine:60rnExpression:str!=NULLrnFor information on how your program can cause an assertion failure,see the Visual C++ documentation on asserts.rn(Press Retry to <em>debug</em> the application)
运行时出现Debug Assertion Failed!求助!!
File:dlgdata.cpprnLine:43rnrnrn重试、取消后,<em>出现</em>以下调试信息:rnLoaded symbols for 'D:\软件工程作业(部分代码)\mywork\Debug\mywork.exe'rnLoaded 'C:\WINDOWS\system32\ntdll.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.rnLoaded symbols for 'C:\WINDOWS\system32\MFC42D.DLL'rnLoaded symbols for 'C:\WINDOWS\system32\MSVCRTD.DLL'rnLoaded 'C:\WINDOWS\system32\gdi32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\user32.dll', no matching symbolic information found.rnLoaded symbols for 'C:\WINDOWS\system32\MFCO42D.DLL'rnLoaded 'C:\WINDOWS\system32\imm32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\advapi32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\rpcrt4.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\lpk.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\usp10.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\msvcrt.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\mfc42loc.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\comctl32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\uxtheme.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\MSCTF.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\MSCTFIME.IME', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\ole32.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\apphelp.dll', no matching symbolic information found.rnLoaded 'C:\WINDOWS\system32\version.dll', no matching symbolic information found.rnThe thread 0xC8C has exited with code 0 (0x0).rnThe thread 0xB04 has exited with code -2147483645 (0x80000003).rnThe program 'D:\软件工程作业(部分代码)\mywork\Debug\mywork.exe' has exited with code -2147483645 (0x80000003).rnrnrnrn求助高手!
CTime转成CString出现DEBUG ASSERTION failed
[code=C/C++] ///我用的是VS2008 rn CTime t = CTime::GetCurrentTime();rn CString strTime = _T("(%y-%m-%d %H:%M:%str)");rn strTime = t.Format(strTime); //这里出错了。不知道为什么?[/code]
为什么会出现Debug Assertion Failed的错误?
我做了一个对话框程序。rn首先定义了一个文件头结构体:rnrnstruct FileHeadrnrn CString m_FileName; //定义文件名rn int m_TableNum; // 表的个数rn CString m_FileTime; //文件建立时间rn;rnrn/*这是一个新建文件的按钮单击函数。功能是新建一个文件,然后把文件头信息写进文件*/rnvoid CTestWriteDlg::OnBtnbuild() rnrn // TODO: Add your control notification handler code herern CFileDialog dlg(FALSE,"mdbf",rn "db1.mdbf",rn OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_ALLOWMULTISELECT,rn "db file(*.mdbf)",rn NULL);rn dlg.m_ofn.lpstrTitle = "新建数据库文件";rn dlg.m_ofn.lStructSize = 88;rn if(dlg.DoModal()==IDOK)rn rn FileHead tempFileHead;rn tempFileHead.m_FileName = dlg.GetPathName();rn tempFileHead.m_TableNum = 0;rn HANDLE handle;rn DWORD dwCB;rn handle = ::CreateFile(dlg.GetPathName(), // 文件名(含路径)rn GENERIC_READ|GENERIC_WRITE, // 文件的操作属性,既可读,又可写rn FILE_SHARE_READ|FILE_SHARE_WRITE, //文件共享属性rn NULL, //文件安全特性,表示文件句柄不能被继承rnOPEN_ALWAYS, //文件的操作,表示创建文件;如文件存在则会出错rnFILE_FLAG_RANDOM_ACCESS, // 针对随机访问对文件缓冲进行优化rnNULL//如果不为零,则指定一个文件句柄新文件将从这个文件中复制扩展属性 rn );rn/*这里之所以写入256个字节是为了以后扩充和升级用*/rnif(::WriteFile(handle,&tempFileHead,256,&dwCB, NULL)==0)rn MessageBox("建立文件失败","警告",MB_ICONERROR);rn CloseHandle(handle);rn rnrnrn/*这也是一个按钮单击消息函数。功能是打开文件读取文件头信息*/rnvoid CTestWriteDlg::OnReadfileinfo() rnrn // TODO: Add your control notification handler code herern CFileDialog dlg(TRUE,"*.mdbf");rn if(dlg.DoModal()==IDOK)rn rn FileHead tempFileHead;rn CFile file;rn file.Open(dlg.GetPathName(),CFile::modeReadWrite);rn file.Read(&tempFileHead,sizeof(FileHead));rn MessageBox(tempFileHead.m_FileName);rn rn rnrnrnrn 但是并没有成功获取文件名。而且在单击MessageBox的确定按钮时<em>出现</em>了Debug Assertion Failed的错误?
[求助]openCV出现debug assertion failed!!
[code=c]rn#include "StdAfx.h"rn#include "highgui.h"rnrnint main(int argc,char** argv)rn IplImage* img = cvLoadImage(argv[1]);rn cvNamedWindow("Example1",CV_WINDOW_AUTOSIZE);rn cvShowImage("Example1",img);rn cvWaitKey(0);rn cvReleaseImage(&img);rn cvDestroyWindow("Example1");rnrn[/code]rnrn一运行结果就<em>出现</em>[img=http://img.my.csdn.net/uploads/201304/11/1365646479_9648.png][/img]rnrn怎么回事啊!!!求大神帮助!!
VS编程出现debug assertion failed怎么办?
编译运行<em>出现</em>如下情况:rn[img=https://img-bbs.csdn.net/upload/201304/29/1367233117_952521.jpg][/img]rnrnwinocc的代码如下:rn[img=https://img-bbs.csdn.net/upload/201304/29/1367233184_500653.jpg][/img]rnrn我的程序代码如下:rn[code=c]// MaintenanceDlg.cpp : implementation filern//rnrn#include "stdafx.h"rn#include "Course.h"rn#include "MaintenanceDlg.h"rn#include "afxdialogex.h"rn#include"CourseSelectDlg.h"rnrn// CMaintenanceDlg dialogrnCCourseSet m_courseSet;rnCCourseLimitSet m_courseLimitSet;rnCCourseSet m_courseSelRecSet;rnCCourseSelSet m_courseSelSet;rnCStudentSet m_studentSet;rnCMsflexgrid1 m_flexgrid;rnrnIMPLEMENT_DYNAMIC(CMaintenanceDlg, CDialog)rnrnCMaintenanceDlg::CMaintenanceDlg(CWnd* pParent /*=NULL*/)rn : CDialog(CMaintenanceDlg::IDD, pParent)rnrnrnrnrnCMaintenanceDlg::~CMaintenanceDlg()rnrnrnrnvoid CMaintenanceDlg::DoDataExchange(CDataExchange* pDX)rnrn CDialog::DoDataExchange(pDX);rn DDX_Control(pDX, IDC_BUTTON_DELETE, m_bDelete);rn DDX_Control(pDX, IDC_BUTTON_INSERT, m_bInsert);rn DDX_Control(pDX, IDC_BUTTON_MODIFY, m_bModify);rn DDX_Control(pDX, IDC_COMBO_SELECTCOURSE, m_comboList);rn DDX_Control(pDX, IDC_EDIT1, m_edit);rnrnrnrnBEGIN_MESSAGE_MAP(CMaintenanceDlg, CDialog)rn ON_CBN_SELCHANGE(IDC_COMBO_SELECTCOURSE, &CMaintenanceDlg::OnSelchangeComboSelectcourse)rn ON_EN_CHANGE(IDC_EDIT1, &CMaintenanceDlg::OnChangeEdit1)rn ON_COMMAND(IDC_MSFLEXGRID_MAINTENANCE, &CMaintenanceDlg::OnMsflexgridMaintenance)rn ON_BN_CLICKED(IDC_BUTTON_INSERT, &CMaintenanceDlg::OnClickedButtonInsert)rn ON_BN_CLICKED(IDC_BUTTON_MODIFY, &CMaintenanceDlg::OnClickedButtonModify)rn ON_BN_CLICKED(IDC_BUTTON_DELETE, &CMaintenanceDlg::OnClickedButtonDelete)rn ON_BN_CLICKED(IDC_OK, &CMaintenanceDlg::OnClickedOk)rnEND_MESSAGE_MAP()rnrnrn// CMaintenanceDlg message handlersrnrn//选择表rnvoid CMaintenanceDlg::OnSelchangeComboSelectcourse()rnrn CString strSelected;rn// m_comboList.GetWindowTextW(strSelected);rn CString sql;rn CString strGridItem;rn CString strTab=_T("");rn strTab.Replace(' ',0x9);rn VARIANT vIndex;rn vIndex.vt=VT_I2;rn int iIndex=1;rn m_comboList.GetLBText(m_comboList.GetCurSel(),strSelected);rn m_flexgrid.Clear();rn if(strSelected=="学生表")rn rn sql="select*from student";rn tableType=1;rn m_flexgrid.put_Cols(4);rn m_flexgrid.put_FormatString(L">|||
对话框程序调试出现debug assertion failed
我写的一个MFC对话框程序,调试的时候就<em>出现</em><em>debug</em> assertion <em>failed</em>!的提示,不知何解。拜托各位指点迷津!rn如下:rn Debug assertion <em>failed</em>!rn Program :D:\projects\RTC\Debug\RTC.exern File:afxwin1.inlrn Line:22
MFC出现Debug assertion failed问题
碰到一个问题,不明白错在哪里,请大神们指点一下!!!n程序目的是在主窗口触发某事件后,弹出新的窗口显示列表,不同事件列表内容不同程序大概框架如下:n在主窗口类中添加了公有成员变量m_DeviceDlg,它也是窗口类型,并且它包含一个列表控件(ListCtrl)n//主窗口类定义nclass CZigBeeHomeAutomationDesktopDlg : public CDialogExnn....npublic:n CDeviceListDlg m_DeviceDlg;n void CZigBeeHomeAutomationDesktopDlg::OnClickDeviceList(NMHDR *pNMHDR, LRESULT *pResult);n....nn//根据触发条件显示列表窗口nvoid CZigBeeHomeAutomationDesktopDlg::OnClickDeviceList(NMHDR *pNMHDR, LRESULT *pResult)nn....ncase ..:n m_DeviceDlg.LoadDeviceList(m_LockDeviceList, m_LockDeviceCount);n m_DeviceDlg.DoModal();ncase ..:n....nn//列表窗口类定义nclass CDeviceListDlg : public CDialogExnn...npublic:n CListCtrl m_TableList;n void LoadDeviceList(void);n...nn//用于重载列表控件以显示不同内容nvoid CDeviceListDlg::LoadDeviceList()nn....nDWORD dwStyle;ndwStyle = m_TableList.GetExtendedStyle();<----这里发生Debug assertion <em>failed</em>nnm_TableList为什么不能用了呢?n
出现Debug Assertion Failed!错误。怎么办啊。
<em>出现</em>Debug Assertion Failed!错误。rnFile:olelink.cpprnLine:85rnrn估计是vc的毛病吗?rnrn很急。帮帮我吧!rn
请问出现Debug Assertion Failed是怎么回事?
我的程序编译通过rn但是运行的时候<em>出现</em>了Debug Assertion Failedrn请问大家这是怎么回事?谢谢!
偶尔偶尔出现乱码,为何?
<em>偶尔</em><em>出现</em>乱码,再刷新就显示正常。
javamail-1.4 api
<em>javamail-1.4</em> api
MFC在debug模式下编译程序时出现了Debug Assertion Failed!
[img=https://img-bbs.csdn.net/upload/201410/05/1412441350_404305.png][/img]rn我写了个贪吃蛇程序,一开始是在<em>debug</em>下编译的,没问题,于是就切换到了release模式下生成了一个程序,之后感觉程序有点问题,就直接在release模式下把代码改了,并且运行成功了,然后我又转换到<em>debug</em>模式下,结果就<em>出现</em>了这个错误rn之后我设置了一些断点,发现程序是在运行到InitInstance()函数中的ShowWindow()函数时崩溃的。rn我想问的是:我后来改代码的时候跟这个函数一点关系没有为什么会在这个函数上崩溃?这个函数有什么特别之处吗?rn还是说我改完以后的代码本身就有问题?
网络还原精灵250客户端
小的现在机房管理,目前采用的是远志公司的网络还原精灵,发现真的非常好用,可惜现在我找的就是50<em>客户端</em>的,现在高分(可以用另开贴送)向各位大虾求购一个<em>250</em><em>客户端</em>的网络还原精灵,谢谢了。还有,大家有没有一个比较好用的机房开放收费软件啊,有点象美萍那种的,但前外不用用美萍哈,那样开放的时候不错,但是会影响正常教学使用,所以不好,不知道各位有没有一款好点的收费软件了。谢谢了。
Debug Assertion Failed !
我这几天做一个小程序,主要是显示位图,主窗体是用CFormView ,开始我只是打开显示一个位图(正常), 后来我在CXXXView::OnInitialUpdate()里加入m_yc.Create(IDD_LEFT_FORM,this) 其中m_yc是一个CDialog类型的(对应的对话框是IDD_LEFT_FORM ,我加入这个Child Style的对话框是想在主窗体的左边<em>出现</em>IDD_LEFT_FORM)。 编译通过程序初始化也正常,但是在打开位图时出问题了:位图可以显示,但<em>出现</em>Debug Assertion Failed !对话框,说是wincore.exe错误,在第639行:rnBOOL AFXAPI AfxUnhookWindowCreate()rnrn _AFX_THREAD_STATE* pThreadState = _afxThreadState.GetData();rn#ifndef _AFXDLLrn if (afxContextIsDLL && pThreadState->m_hHookOldCbtFilter != NULL)rn rn ::UnhookWindowsHookEx(pThreadState->m_hHookOldCbtFilter);rn pThreadState->m_hHookOldCbtFilter = NULL;//本行出错!!!rn rn#endifrn if (pThreadState->m_pWndInit != NULL)rn rn pThreadState->m_pWndInit = NULL;rn return FALSE; // was not successfully hookedrn rn return TRUE;rnrnrn这是怎么一回事哦?? 大家帮帮忙
Debug Assertion Failed错误?
我是VC菜鸟,用F5调试时,执行中<em>出现</em>一个提示框:rnrnDebug Assertion FailedrnrnFile: dbgheap.crnLine 1017rnrn.....rnrn原因是什么
Debug Assertion Failed!问题
我按照书上的例子把程序做好rn运行的时候<em>出现</em>Debug Assertion Failed!rn我无法做出对应的解决方案rn请高手出马rn
Debug Assertion Failed什么意思?
在调试一个程序的时候,没有语法错误,执行后就跳出对话框来说:Debug Assertion Failed,怎样才能避免?rnrn我的程序如下:rnrn//BinaryTree.hrn // 二叉树类 //rn#includernusing namespace std;rnrntemplate class BinaryTree;rnrntemplate class BinTreeNodernrn friend class BinaryTree;rn public:rn BinTreeNode():LeftChild(NULL),RightChild(NULL)rn rn BinTreeNode( T Item,BinTreeNode* Left=NULL,BinTreeNode* Right=NULL):Data(Item),LeftChild(Left),RightChild(Right)rn rn T GetData() const rn rn return Data;rn rn BinTreeNode* GetLeft() const rn rn return LeftChild;rn rn BinTreeNode* GetRight() const rn rn return RightChild;rn rn void SetData(const T& Item)rn rn Data=Item;rn rn void SetLeft(BinTreeNode* L)rn rn LeftChild=L;rn rn void SetRight(BinTreeNode* R)rn rn RightChild=L;rn rn private:rn BinTreeNode* LeftChild, * RightChild;rn T Data;rn;rnrntemplate class BinaryTreernrn public:rn BinaryTree():Root(NULL)rn rn BinaryTree(T Value):RefValue(Value),Root(NULL)rn rn virtual ~BinaryTree()rn rn Destroy(Root);rn rn virtual int IsEmpty()rn rn return Root==NULL?1:0;rn rn virtual BinTreeNode *LeftChild(BinTreeNode* Current)rn rn return Root!=NULL?Current->LeftChild:NULL;rn rn virtual BinTreeNode *RightChild(BinTreeNode* Current)rn rn return Root!=NULL?Current->RightChild:NULL;rn rn const BinTreeNode* GetRoot() constrn rn return Root;rn rn void SetRoot(BinTreeNode* TheRoot)rn rn Root=TheRoot;rn rn private:rn BinTreeNode *Root;rn T RefValue;rn BinTreeNode* Parent(BinTreeNode* Start,BinTreeNode *Current);rn void Destroy(BinTreeNode* Current);rn;rnrntemplatevoid BinaryTree::Destroy(BinTreeNode* Current)rnrn if (Current!=NULL)rn rn Destroy(Current->LeftChild);rn Destroy(Current->RightChild);rn delete Current;rn rnrnrntemplate BinTreeNode* BinaryTree::Parent(BinTreeNode* Start,BinTreeNode *Current)rnrn if(Start==NULL) return NULL;rn if(Start->LeftChild==Current|| Start->RightChild==Current)rn return Start;rn BinTreeNode* p;rn if ((p=Parent(Start->LeftChild,Current))!=NULL)rn return p;rn else return Parent(Start->RightChild,Current);rnrnrn//Main.cpprnrn#include rn#include "BinaryTree.h"rn//using namespace std;rnrnvoid main()rnrn BinTreeNode TestNode;rn BinTreeNode Test2Node;rn BinTreeNode* pNode;rn BinaryTree TestTree; rnrn Test2Node.SetData(3);rn TestNode.SetData(8);rn TestNode.SetLeft(&Test2Node);rn pNode=&TestNode;rn TestTree.SetRoot(pNode);rnrn cout<
Debug Assertion Failed!错误
编译时<em>出现</em>以下错误:rnrnDebug Assertion Failed!rnProgram:.... am Files\microsoft visuall studio\MyProjects\Pwd\Debug\pwd.exernrnfile:dlgData.cpprnLine:624rnFor information on how your program can cause an asserttion failure,see the visual c++ documentattion on asserts.rn(press retry to <em>debug</em>y the applicatio)rnrn以上是弹出对话框的内容,以下是源程序的一部分.rn这是什么问题,怎么解决???
Debug Assertion Failed错误
[code=C/C++][/code]rn#includernusing namespace std;rn//利用附加数组重排数组元素rntemplaternvoid Rearrange(T *&a, int n, int r[])rn//按序重排数组a中的元素,使用附加数组urn T *u = new T[n+1];rn //在u中移动到正确的位置rn for (int i=0; irnvoid Rank(T a[], int n, int r[])rn// Rank the n elements a[0:n-1].rn for (int i = 0; i < n; i++)rn r[i] = 0; // initializern // compare all element pairsrn // Visual complains if we say int i againrn for (int i = 1; i < n; i++)rn rn for (int j = 0; j < i; j++)rn rn if (a[j] <= a[i]) r[i]++;rn else r[j]++;rn rn rn;rnrn//Swap函数rntemplaterninline void Swap(T&a, T&b)rn rn T temp = a;rn a = b;rn b = temp;rn;rn//主函数rnvoid main()rnrn int n = 5;rn int *x = new int[5];rn int y[5] = 5, 9, 2, 7, 0;rn for (int i=0; i
Debug Assertion Failed!错误问题
写了一个网络捕包的小程序,在vc6.0 运行正常,在2005下出错,编译没有问题,运行中弹出对话框rn错误如下,rn Debug Assertion Failedrn file:isctype.crn line:56rn Expression:(unsinged)(c+1);rn rn *string = 0;rn return ascii_string;rnrn[/code]rn问题:rn1. vc2005中的判断可打印字符的函数是否为isgraph?rn2. vc2005中如何正确显示网络包中的数据?rn谢谢rnrn
Debug Assertion Failed 问题?
在vc中我做了一个界面,只想把表中的字段用编辑框显示出来,点击Adodc控件的下条记录,上条记录等就能讲表中的字段显示在相应的编辑框中,我不知道要在哪里写代码,就写在MoveComplete事件里,不知道对不对,运行后<em>出现</em>这样的错误框rn显示Debug Assertion Failed 错误,我是新手,不知道要怎么解决,求大家帮下忙!rnrnvoid CDeptDlg::OnMoveCompleteAdodc1(long adReason, LPDISPATCH pError, long FAR* adStatus, LPDISPATCH pRecordset) rn_RecordsetPtr m_pRecordset;rn rn m_pRecordset.CreateInstance(__uuidof(Recordset)); //创建RecordSet实例rn pRecordset->QueryInterface(IID_IDispatch, (void **)&m_pRecordset);rn if(! m_pRecordset->adoEOF)rn rn m_DeptId=m_DataGrid.GetItem(0);rn m_DeptName=m_DataGrid.GetItem(1);rn UpdateData(FALSE);rn rn else rn m_pRecordset->MoveFirst();rn while (!m_pRecordset->adoEOF)rn rn m_DeptId=m_DataGrid.GetItem(0);rn m_DeptName=m_DataGrid.GetItem(1);rn UpdateData(FALSE);rn rn
Debug Assertion Failed!
fputc的参数传递有问题,不知道怎么改,还望各位指点不胜感激rn[img=https://img-bbs.csdn.net/upload/201605/19/1463635273_367811.png][/img][img=https://img-bbs.csdn.net/upload/201605/19/1463635442_654717.png][/img]
关于Debug Assertion Failed
[img=https://img-bbs.csdn.net/upload/201410/02/1412232023_453340.png][/img]rnvs212 mfc编程,应该是数据库导入和指针的问题(我猜的)rn1.我先在stdafx.h中添加如下代码rn#import "C:\Program Files\Common Files\System\ado\msado15.dll" rename("EOF","adoEOF")rename("BOF","adoBOF")rnusing namespace ADODB;rn这步貌似没问题rn2.需要将_ConnectionPtr m_pConnection;_RecordsetPtr m_pRecordset;这两个指针添加到对应的dlg.h的类中rn因为我建立的是单文档的应用,所以我是将这两个指针放入该界面的头文件中了rn3.将如下代码放入初始化函数中,rn if(!AfxOleInit())rn rn rn try rn rn m_pConnection.CreateInstance(__uuidof(Connection)); rn m_pConnection->Open("Provider=SQLOLEDB;server=LEE-PC;Uid=sa;Pwd=110410322li;Database=MAF","","",adModeUnknown);rn rn catch(_com_error e) rn rn AfxMessageBox(e.Description()); rn rnrnrn运行时,进行到用到数据库的地方就<em>出现</em>如图的Debug Assertion Failedrn感觉是不是2,3步代码放的文件的位置不对?
Debug Assertion Failed
如题,一般是什么问题?如何解决?谢谢
vs2008 debug assertion failed
[img=http://img.my.csdn.net/uploads/201211/14/1352857313_8587.jpg][/img]rn重试中断,显示出错位置在这rn[img=http://img.my.csdn.net/uploads/201211/14/1352857227_3586.jpg][/img]rn昨天还可以的,今天就不行了,不知道为什么,求高手指点rnrn
Debug Assetion Failed 怎么回事?
这个程序主要是模拟计算机远程监控,用一个计时器,每隔2.5秒截一次屏,把位图数据复制到缓存,再读出来贴到窗口上。本人是菜鸟,不会用调试。有一个CXX0030的ERROR 不只是甚意思。还请各位高手帮忙。。代码贴在下面。。 rn[code=C/C++]rnCBitmap bmp;//内存位图rnCDC wdc; //设备环境rnCDC* pDC; //指向桌面窗口的设备环境指针rnCDC* pthisDC;//指向监控端窗口的显示设备环境指针。rnCDC thisWdc;//监控端计算机设备环境rnCBitmap thisBmp;//监控端计算机内存位图rnCHAR dot[3276800];//位图数据缓冲区1024×800×4rnrnBOOL CMyDDBDlg::OnInitDialog()rn...rn static CWindowDC ddc(GetDesktopWindow());//创建与桌面窗口相关联的显示设备描述表。。rn pDC=&ddc; rn wdc.CreateCompatibleDC(pDC);rn bmp.CreateCompatibleBitmap(pDC,1024,800);rn wdc.SelectObject(&bmp);rn rn SetTimer(1,<em>250</em>0,NULL);rn ...rnrnvoid CMyDDBDlg::OnTimer(UINT nIDEvent) rnrn // TODO: Add your message handler code here and/or call defaultrn wdc.BitBlt(0,0,1024,800,pDC,0,0,SRCCOPY);rn bmp.GetBitmapBits(1638400*2,(LPVOID)dot);rn //发送数据。。。rn //接收数据。。。rn //检查数据的完整性,等。。。rn rnrn //贴图。。rn CRect rect;rn GetClientRect(&rect);rn pthisDC=GetDC();rn thisBmp.CreateCompatibleBitmap(pthisDC,1024,800);rn thisWdc.CreateCompatibleDC(pthisDC);rnrn thisWdc.SelectObject(&thisBmp);rn thisBmp.SetBitmapBits(1638400*2,(LPVOID)dot);rn pthisDC->StretchBlt(0,0,rect.Width(),rect.Height(),&thisWdc,0,0,1024,800,SRCCOPY);rn rnrn CDialog::OnTimer(nIDEvent);rnrnrn[/code]
Debug Assertion Failed请教
我编写了一个udp接收程序,编译通过了,点击发送按钮后<em>出现</em>Debug Assertion Failed错误,filecore.cpp line 342rnvoid CFile::SetLength(DWORD dwNewLen)rnrn ASSERT_VALID(this);rn [color=#FF0000]ASSERT(m_hFile != (UINT)hFileNull);[/color]rnrn Seek((LONG)dwNewLen, (UINT)begin);rnrn if (!::SetEndOfFile((HANDLE)m_hFile))rn CFileException::ThrowOsError((LONG)::GetLastError());rnrn就是红色标记的那一行出了错误,请问该怎么解决呢
Debug Assertion Failed!!!
我用视频编解码器.exe 执行文件,解码一个视频文件时,也就播放了2,3秒就报出这个错误了。rnDebug Assertion Failed!rnprogram :。。。。。。\ \\\视频编解码器.exe rnFile:dbgheap.crnLine:1044rnExpression:_CrtIsValidHeapPointer(pUserData)rnrnFor information on how your program can cause an assertion failure,see the Visual C++ documentation on assert。该窗口下面有两个按钮 终止 调试 。rnrnrn之后马上弹出一个标题为“应用程序错误”的窗口。显示内容如下:rn 应用程序发生异常 unknown software exception(0x80000003),位置为0x7c92120e.rn要终止程序,请单击“确定”。rn要调试程序,请单击“取消”。rnrn希望遇到过类似错误的朋友帮忙解答下,我不知道如何改正,找到了dbgheap.C文件,不懂错在那里???
Debug Assertion Failed! afxcoll.inl
Program: *.exernFile: afxcoll.inlrnLine: 319rnrnrn不知道是错在哪里。。。请教各位大虾~~
debug assertion failed
vc6调试程序跳出此框,file:afxwin1.inl,line : 22
关于Debug Assertion Failed!
#includern#includern#includernrn#define filename (c:\\zj.txt) //文件位置 rn#define N 100 //最大员工数 rntypedef struct memberrnrn char name[20];rn int no;rn char sex[10];rn char birthday[30];rn char marry[10];rn int child; rnST;rnST jober[N]; //公会成员rnrn/************************************rn 登陆函数rn*************************************/ rnvoid login()rnrn char password[20] , username[20];rn char name[20] , word[20];rn int flag = 0;rn FILE *fp = NULL;rn if( NULL == (fp=fopen("c:\\zj.txt","rb+")) )rn rn printf("不能打开文件请查找C盘根目录下是否有zj.txt!");rn getchar();rn exit(1);rn rn fread(username,sizeof(username),1,fp);rn fread(password,sizeof(password),1,fp);rn printf("请输入用户名和密码并用空格隔开(默认用户名密码admin admin):");rn while(flag < 3)rn rn scanf("%s %s",&name[0],&word[0]);rn if(strcmp(username,name) == 0 && strcmp(password,word) == 0)rn break;rn elsern rn printf("用户名或密码错误请重新输入:");rn flag++; rn rn rn fclose(fp);rn fp = NULL;rn if(flag>2)rn rn printf("密码错误次数过多 退出系统!!!");rn getchar();rn getchar();rn exit(1);rn rnrnrn/************************************rn 函数声明区rn************************************/rnvoid input(ST *a);rnint select();rnvoid pandect();rnrnint main(void)rn rn int x = 0; rn login();rn while(1)rn rn printf("\n*******************************************\n");rn printf("* *\n");rn printf("* 欢迎进入公会成员管理系统 *\n");rn printf("* *\n"); rn printf("* 请选择您需要的功能 *\n");rn printf("* 1:工会成员信息录入 *\n");rn printf("* 2:工会成员浏览 *\n");rn printf("* 3:查询工会成员信息 *\n");rn printf("* 4:工会成员信息删除 *\n");rn printf("* 5:工会成员信息修改 *\n");rn printf("* 6:修改密码 *\n");rn printf("* 7:退出程序 *\n");rn printf("* *\n");rn printf("*******************************************\n");rn scanf_s("%d",&x,1);rn switch(x)rn rn case 1: input(jober); break;rn case 2: pandect(); break;rn case 3: ;break;rn case 4: ;break;rn case 5: ;break;rn case 6: ;break;rn case 7:exit(1);break;rn default: ;break;rn rn rn rnreturn 0;rnrn/***********************rn 选择Y / Nrn 返回值0或者1rn************************/rnint select()rnrn char tmp;rn scanf("%c",&tmp);rn if(tmp == 89 || tmp == 67)rn return 1;rn else if(tmp == 78 || tmp == 46)rn return 0;rn elsern rn printf("输入错误 请重新输入!!!");rn select();rn rnrnrn/************************rn 信息录入rn*************************/rnvoid input(ST *a)rnrn FILE *fp = NULL;rn int x = 1;rn fp=fopen("c:\\zj.txt","ab+");rn while(x)rn rn printf("请输入成员姓名,工号,性别,生日,婚否,子女数 并用空格隔开:");rn printf("\n ");rn scanf("%s %d %s %s %s %d",a->name,&(a->no),a->sex,a->birthday,a->marry,&(a->child));rn fwrite(a,sizeof(ST),1,fp);rn printf("请问还需要录入吗? Y/N :");rn printf("\n");rn x = select();rn rn fclose(fp);rn fp = NULL;rnrnrn/************************rn 信息总览rn************************/rnvoid pandect()rnrn FILE *fp = NULL;rn int x = 0;long t;rn fp = fopen("c:\\zj.txt","rb+");rn fseek(fp,0L,2);rn t = ftell(fp);rn rewind(fp);rn t = t/sizeof(ST);rn printf("公会成员数:%d\n",t);rn fseek(fp,40L,0);rn fread(jober,sizeof(ST),100,fp);rn while(x < t)rn rn printf("姓名:%s 工号:%d 性别:%s \n生日:%s 婚否:%s 子女数:%d \n",jober[x].name,jober[x].no,jober[x].sex,jober[x].birthday,jober[x].marry,jober[x].child);rn printf("\n");rn x++;rn fclose(fp);rn fp = NULL;rn rn
Debug Assertion Failed问题
Debug Assertion Failedrnd:\programe\^^^^^rnFILE afx.inlrnLINE 177rnrn对应的代码rn_AFX_INLINE TCHAR CString::operator[](int nIndex)constrnrnASSERT(nIndex>=0);rnASSERT(nIndexnDataLength);rnreturn m_pchData[nIndex];rnrn如何解决.高手指点.rnrn
Debug Asserts Failed!
File:dbgdel.cpprnLine:47rnExpression:_BLOCK_TYPE_IS_VALID(pHead->nBlockUse)rnrn我在F5的过程中,当两个位图相碰时就出来这个了,怎么回事啊?rnP.S:运行在Debug中的.exe文件却发现很正常!rn求助!
Debug Assertion Failed!
用VS2008编译,,出错!新手,大家不吝指教啊rnrnrnProgram:f;\VS\Convolution_first\Debug\Convolution_first.exernFile: f:\dd\vctools\crt_bld\self_x86\crt\src\fprintf.crnLine:55rnrnrnExpression:(str!=NULL)rnrnFor information on how your program can cause assertion failure,see the Visual C++ documentation on asserts.rnrnrn我的主函数:rn#include "head.h"rnrnrn int Message0[(L+m)];rn int Message1[(L+m)];rn int Encoded0[(L+m)];rn int Encoded1[(L+m)];rn int Encoded2[(L+m)];rnrn int Transmitted0[(L+m)];rn int Transmitted1[(L+m)];rn int Transmitted2[(L+m)];rnrn double Received0[(L+m)];rn double Received1[(L+m)];rn double Received2[(L+m)];rnrn int Output0[(L+m)];rn int Output1[(L+m)];rn int Output2[(L+m)];rnrn int Decoded0[(L+m)];rn int Decoded1[(L+m)];rn rnrn int Trellis_next[8][4],Trellis_current[8][4], Trellis_Code[8][4];rn double SIGMA;rn double BER;rnchar name[80]="CON.dat";rnFILE *fp;rnint state=(int)time(NULL);rnrnint main()rnrn srand((unsigned)time(NULL)); rn fp=fopen(name,"w");rnrn fprintf(fp," EbNo BER\n");rn rn //int total_num;rn int i;rn int error_frame;rn int total_num;rn double EbNo,No;rn unsigned int errbit;rnrn rn for(EbNo=INIT;EbNo!=FINAL+1;EbNo+=SNRINC) //set Eb=1;rn rn errbit =0;rn error_frame=0;rn total_num =0;rn No =1.0/pow(10.0,EbNo/10.0);rn SIGMA =sqrt(No/2);rn rn while(error_frame
关于:Debug Assertion Failed
我的程序编译,构件均通过,一执行就<em>出现</em>rnDebug Assertion FailedrnFile:appcore.cpprnLine: 85 / 355 等多行错误rn若按忽略,最后程序不能执行下去。后来我把原来的语句注释掉仍然有该错误。rn这是什么错误, 如何解决.
debug assertion failed 出错
运行程序时出错,显示<em>debug</em> assertion <em>failed</em> ,出错是怎么回事,大哥们rn#include rn#include rnrnint main()rnrn FILE *fp=fopen("C:\\Documents and Settings\\Administrator\\桌面\\test.txt", "r");rn float arr[3][2], *p;rn int i, j;rn rn p = (float *)arr;rn for(i=0; i);rn return 0;rnrnrnrnrnrnrn
Debug Assertion Failed错误问题
各位高手:rn 我写了一个OCX程序,功能是在网页中点击按钮后会启动一个对话框。现在的问题是刚打开网页点击按钮没什么问题,但当我将启动的对话框关闭后再重新点击按钮时,就会报出如下错误:rnDebug Assertion Failed!rnProgram :c\Program File\Internet Explorer\IEXPLORER.EXErnFile:winocc.cpprnLine:279rnrnFor information on how your program can cause an assertion failure,see the Visaul C++ documentation on asserts.rn(Press Retry to <em>debug</em> the application)rnrn当点击忽略后程序依然能够正常运行。就是说打开网页后第一次启动对话框不会报错,后面再启动时就会报错。rnrn请问问题出在哪里?谢谢高手们了。
Debug Assertion Failed,救我
program :F:\Server\Debug\Server.exernFile:afxcmn2.inlrnLine:303rnrn什么意思?rn望大虾指教rn
又见debug assertion failed
多路串口程序,写串口后,读串口数据进行分析。限于数据量大及硬件设备的配置,程序基本无法使用开发用的电脑来进行跟踪调试。rnrn运行两路串口时,正常。但运行三路串口时,release版本,运行取得正常结果,然后程序马上自动关闭。而<em>debug</em>版本,运行取得正常结果,然后马上弹出我想大家都见过的“<em>debug</em> assertion <em>failed</em>”.点“忽略”,则可以继续使用软件。rnrnas following:rn````````````````````````````````````````````````````````rnDebug Assertion Failed!rnrnProgram: ..path...\xxxx.exernFile:afxole.inlrnLine:277rnrnFor information on how your program can cause an assertion failure, see the visual c++ documentation on asserts.rnrn```````````````````````````````````````````````````````rnrn可从哪些方面的原因进行判断和诊断?——(最好能通过分析直接解决!!!)rn如果非要跟踪调试,请给出一些需要注意的事项和有用的技巧。rnrn先谢谢大家。今天累了,先回家休息,明天再来琢磨这个bug。谢谢rn
关于debug assertion failed!!!!
<em>debug</em> assertion <em>failed</em>!rnrnfile:......\atlcom.hrnline 149rnrn HRESULT GetPropertyByName(LPCOLESTR lpsz, VARIANT* pVar)rn rn ATLASSERT(p); //line 149rn ATLASSERT(pVar);rn DISPID dwDispID;rn HRESULT hr = GetIDOfName(lpsz, &dwDispID);rn if (SUCCEEDED(hr))rn hr = GetProperty(p, dwDispID, pVar);rn return hr;rn rnrnrn有人碰到过这样的问题么?什么原因?
Debug assertion Failed?的问题
在运行时提示Debug assertion Failed?,rnFile:dlgdata.cpp rnLine: 308rn我点了 重试-取消-重试后,进入到调试器,跟踪到下列红颜色语句:rnvoid AFXAPI DDX_Radio(CDataExchange* pDX, int nIDC, int& value)rn // must be first in a group of auto radio buttonsrnrn HWND hWndCtrl = pDX->PrepareCtrl(nIDC);rnrn [color=#FF0000]ASSERT(::GetWindowLong(hWndCtrl, GWL_STYLE) & WS_GROUP);[/color] ASSERT(::SendMessage(hWndCtrl, WM_GETDLGCODE, 0, 0L) & DLGC_RADIOBUTTON);rn unused CXX0030: Error: expression cannot be evaluatedrnrn if (pDX->m_bSaveAndValidate)rn value = -1; // value if none foundrn请问该如何修改!rn其间我删除了系统自动生成的一个按钮的函数,输入了新的函数,就<em>出现</em>了这种情况!rn
Debug Assertion Failed!!
我的是一个画线程序,折现的两端用小圆圈显示,用m_PointArray存储折线的端点坐标,m_PoingNum保存端点数目,但是当我加上红色的哪一行的时候就会<em>出现</em>Debug Assertion Failed!!这样的错误,这是为什么呢?请教各位大侠rnrnvoid CReadCoodinateView::MyDraw()rnrn CDC *pDC = GetDC(); //获取设备环境 rn int n=m_PointNum-1;rn /*根据坐标点绘出直线*/ rn for (int i = 0;iEllipse(m_PointArray[i].x-4,m_PointArray[i].y-4,m_PointArray[i].x+4,m_PointArray[i].y+4);rnrn pDC->MoveTo(m_PointArray[i].x,m_PointArray[i].y);rn pDC->LineTo(m_PointArray[i+1].x,m_PointArray[i+1].y); rn rn [color=#FF0000]pDC->Ellipse(m_PointArray[n-1].x-4,m_PointArray[n-1].y-4,m_PointArray[n-1].x+4,m_PointArray[n-1].y+4);[/color] ReleaseDC(pDC);rn
Debug Assertion Failed!(dllinit.cpp)
只有在<em>debug</em>版本时,我的工程运行时<em>出现</em> Debug Assertion Failed!错误<em>出现</em>在dllinit.cpp内AfxFindResourceHandle(name,type)函数里,name为null。请问为什么名字会找不到?怎么办?
Debug Assertion failed!
编译后运行运行VC++2012对话框程序时,删除界面上Button 后,<em>出现</em>这样问题。rnrnProgram F:\xx\xx.exernFile:f:\dd\vctools\vc7libs\ship\atlmfc\src\wincore.cpp (我电脑中无此目录及文件)rnline:379rnrnfor information on how your grogram can cause an assertion failure,see the Visual C++ documentation on asserts.rnrn 中止,重试,忽略!rnrn rn 请问是什么错误?提示的路径是不存在的。谢谢各位了。VS2012太容易碰到这样错误了。
debug Assertion failed解决
我的这段代码为什么会引起中断呢,经断点调试发笑错误是如下:rnAFXCMN_INLINE BOOL CListCtrl::SetColumnWidth(int nCol, int cx)rn ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_SETCOLUMNWIDTH, nCol, MAKELPARAM(cx, 0)); rnrnrnrn源代码如下,希望得到大神的帮忙,感激不尽啊!rnvoid CTabControlDlg::OnSize(UINT nType, int cx, int cy) rnrn rn CDialog::OnSize(nType, cx, cy);rn rn // TODO: Add your message handler code herern if(nType==SIZE_RESTORED||nType==SIZE_MAXIMIZED)rn rn if(nType==SIZE_MAXIMIZED)rn rn m_listctrl.SetColumnWidth(3,922);rn rn else if(nType==SIZE_RESTORED)rn rn m_listctrl.SetColumnWidth(3,448);rn rn rn resize();rn rnrnrnrnvoid CTabControlDlg::resize()rnrn float fsp[2];rn POINT Newp; //rn CRect recta; rn GetClientRect(&recta); //rn Newp.x=recta.right-recta.left;rn Newp.y=recta.bottom-recta.top;rn fsp[0]=(float)Newp.x/Old.x;rn fsp[1]=(float)Newp.y/Old.y;rn CRect Rect;rn int woc;rn CPoint OldTLPoint,TLPoint; //rn CPoint OldBRPoint,BRPoint; //rn HWND hwndChild=::GetWindow(m_hWnd,GW_CHILD); //rn while(hwndChild) rn rn woc=::GetDlgCtrlID(hwndChild);//È¡µÃIDrn if(woc == IDC_LIST_MAIN)rn rn GetDlgItem(woc)->GetWindowRect(Rect);rn ScreenToClient(Rect); rn OldTLPoint = Rect.TopLeft(); rn TLPoint.x = long(OldTLPoint.x); rn TLPoint.y = long(OldTLPoint.y); rn OldBRPoint = Rect.BottomRight(); rn BRPoint.x = long(OldBRPoint.x *fsp[0]); rn BRPoint.y = long(OldBRPoint.y *fsp[1]); rn Rect.SetRect(TLPoint,BRPoint); rn GetDlgItem(woc)->MoveWindow(Rect,TRUE);rn rn else if(woc == IDC_BUTTON_CHINESE)rn rn GetDlgItem(woc)->GetWindowRect(Rect);rn ScreenToClient(Rect); rn OldTLPoint = Rect.TopLeft(); rn TLPoint.x = long(OldTLPoint.x*fsp[0]); rn TLPoint.y = long(OldTLPoint.y); rn OldBRPoint = Rect.BottomRight(); rn BRPoint.x = long(OldBRPoint.x *fsp[0]); rn BRPoint.y = long(OldBRPoint.y); rn Rect.SetRect(TLPoint,BRPoint); rn GetDlgItem(woc)->MoveWindow(Rect,TRUE); rn rn hwndChild=::GetWindow(hwndChild, GW_HWNDNEXT);rn rn Old=Newp;rn
DEBUG ASSERTION FAILED问题
代码如下:rn[code=c]#include rn#include rn#include rn#include rnHINSTANCE hinst;rnLRESULT CALLBACK MainWndProc (HWND, UINT, WPARAM, LPARAM);rnBOOL InitApplication (HINSTANCE hInstance)rnrn WNDCLASSEX wcx;rn wcx.cbSize = sizeof (wcx);//WNDCLASSEX 的大小rn wcx.style = CS_HREDRAW | CS_VREDRAW;//从这个窗口类派生的窗口具有的风格rn wcx.lpfnWndProc = MainWndProc;//窗口处理函数的指针rn wcx.cbClsExtra = 0;//指定紧跟在窗口类结构后的附加字节数rn wcx.cbWndExtra = 0;//指定紧跟在窗口事例后的附加字节数rn wcx.hInstance = hInstance;//本模块的事例句柄rn wcx.hIcon = LoadIcon (NULL, IDI_APPLICATION);//图标的句柄rn wcx.hCursor = LoadCursor (NULL, IDC_ARROW);//光标的句柄rn wcx.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);//背景画刷的句柄rn wcx.lpszMenuName = NULL;//指向菜单的指针rn wcx.lpszClassName = "MYCLASS";//指向类名称的指针rn wcx.hIconSm = LoadIcon(NULL, IDI_WINLOGO);//和窗口类关联的小图标。如果该值为NULL。则把hIcon中的图标转换成大小合适的小图标rn return (RegisterClassEx (&wcx));rnrnHWND CreateEdit (HWND);rnBOOL InitInstance (HINSTANCE hInstance, int nCmdShow)rnrn HWND hwnd, hwndEdit;rn RECT rect;rn hwnd = CreateWindow (rn "MYCLASS",//WNDCLASSEX中定义的lpszClassNamern "NEW",//窗口标题rn WS_OVERLAPPEDWINDOW,//创建窗口的风格rn CW_USEDEFAULT,//指定窗口的初始水平位置rn CW_USEDEFAULT,//指定窗口的初始垂直位置rn CW_USEDEFAULT,//以设备单元指明窗口的宽度rn CW_USEDEFAULT,//以设备单元指明窗口的高度rn NULL,//指向被创建窗口的父窗口或所有者窗口的句柄rn LoadMenu (hInstance, MAKEINTRESOURCE(IDR_MENU1)),//菜单句柄rn hInstance,//程序实例的句柄rn (LPVOID) NULL);rn hwndEdit = CreateEdit (hwnd);rn ShowWindow (hwnd, nCmdShow);rn UpdateWindow (hwnd);rn if (!hwnd)rn rn return FALSE;rn rn elsern rn return TRUE;rn rnrnHWND CreateEdit (HWND hwndP)rnrn HWND hwnde;rn hwnde = CreateWindow (rn "EDIT",rn NULL,rn WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_BORDER | ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL,rn CW_USEDEFAULT,rn CW_USEDEFAULT,rn CW_USEDEFAULT,rn CW_USEDEFAULT,rn hwndP,rn (HMENU)NULL,rn hinst,rn (LPVOID)NULL);rn ShowWindow (hwnde, SW_SHOW);rn UpdateWindow (hwnde);rn return hwnde;rnrnLRESULT CALLBACK MainWndProc (HWND hwnd,rn UINT uMsg,rn WPARAM wParam,rn LPARAM lParam)//消息处理函数rnrn CString lpFileName;rn CFileDialog Dia (TRUE);rn switch (uMsg)rn rn case WM_COMMAND:rn switch (LOWORD(wParam))rn rn case ID_40001:rn rn if (Dia.DoModal ()== IDOK)rn rn lpFileName = Dia.GetPathName ();rn MessageBox (NULL, lpFileName, "文件路径", MB_OK);//显示读取的文件路径rn rn break;rn rn default:rn break;rn rn break;rn case WM_DESTROY://窗口消失函数rn ExitThread (0);//线程终止rn break;rn default:rn return DefWindowProc (hwnd, uMsg, wParam, lParam);//系统默认消息处理函数rn rn UpdateWindow (hwnd);rnrnint WinMain (HINSTANCE hInstance,rn HINSTANCE hPrevInstance,rn LPSTR lpCmdLine,rn int nCmdShow)rnrn MSG msg;rn if (!InitApplication (hInstance))rn rn return FALSE;rn rn if (!InitInstance (hInstance, nCmdShow))rn rn return FALSE;rn rn while (GetMessage (&msg, (HWND)NULL, 0, 0))rn rn TranslateMessage (&msg);rn DispatchMessage (&msg);rn rn return msg.wParam;rnrn[/code]rn没弄懂咋回事...求解
Debug Assertion Failed! 求助
程序运行一小会就<em>出现</em>了这个问题。代码如下:rnDebug Assertion Failed! rnProgram: ****.exe rnFile: dbgheap.c rnline: 1044 rnrnExpression: _CrtIsValidHeapPoint(pUserData) rnrnFor information on how your program can cause an assertion failure, see the Visual C++ documentation on assertsrn调试堆栈是正在运行。rn代码如下:rn#ifdef _DEBUGrn#define new DEBUG_NEWrn#undef THIS_FILErnstatic char THIS_FILE[] = __FILE__;rn#endifrn// CAboutDlg dialog used for App Aboutrnclass CAboutDlg : public CDialogrnrnpublic:rn CAboutDlg();rnrn// Dialog Datarn //AFX_DATA(CAboutDlg)rn enum IDD = IDD_ABOUTBOX ;rn //AFX_DATArnrn // ClassWizard generated virtual function overridesrn //AFX_VIRTUAL(CAboutDlg)rn protected:rn virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV supportrn //AFX_VIRTUALrnrn// Implementationrnprotected:rn //AFX_MSG(CAboutDlg)rn //AFX_MSGrn DECLARE_MESSAGE_MAP()rn;rnrnCAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)rnrn //AFX_DATA_INIT(CAboutDlg)rn //AFX_DATA_INITrnrnrnvoid CAboutDlg::DoDataExchange(CDataExchange* pDX)rnrn CDialog::DoDataExchange(pDX);rn //AFX_DATA_MAP(CAboutDlg)rn //AFX_DATA_MAPrnrnrnBEGIN_MESSAGE_MAP(CAboutDlg, CDialog)rn //AFX_MSG_MAP(CAboutDlg)rn // No message handlersrn //AFX_MSG_MAPrnEND_MESSAGE_MAP()rnrn/////////////////////////////////////////////////////////////////////////////rn// CTempDlg dialogrnrnCTempDlg::CTempDlg(CWnd* pParent /*=NULL*/)rn : CDialog(CTempDlg::IDD, pParent)rnrn //AFX_DATA_INIT(CTempDlg)rn m_strT1 = _T("");rn m_strT10 = _T("");rn m_strT2 = _T("");rn m_strT3 = _T("");rn m_strT4 = _T("");rn m_strT5 = _T("");rn m_strT6 = _T("");rn m_strT7 = _T("");rn m_strT8 = _T("");rn m_strT9 = _T("");rn m_strTime = _T("");rn //AFX_DATA_INITrn // Note that LoadIcon does not require a subsequent DestroyIcon in Win32rn m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);rn m_bAutoSend=FALSE;rn m_bAutoTran=FALSE;rn m_nCycleTime=1000;rnrnrnrnvoid CTempDlg::DoDataExchange(CDataExchange* pDX)rnrn CDialog::DoDataExchange(pDX);rn //AFX_DATA_MAP(CTempDlg)rn DDX_Control(pDX, IDC_BUTTON_Send, m_ctrButtonSend);rn DDX_Control(pDX, IDC_EDIT_TIME, m_ctrTime);rn DDX_Control(pDX, IDC_EDIT_T9, m_ctrT9);rn DDX_Control(pDX, IDC_EDIT_T8, m_ctrT8);rn DDX_Control(pDX, IDC_EDIT_T7, m_ctrT7);rn DDX_Control(pDX, IDC_EDIT_T6, m_ctrT6);rn DDX_Control(pDX, IDC_EDIT_T5, m_ctrT5);rn DDX_Control(pDX, IDC_EDIT_T4, m_ctrT4);rn DDX_Control(pDX, IDC_EDIT_T3, m_ctrT3);rn DDX_Control(pDX, IDC_EDIT_T2, m_ctrT2);rn DDX_Control(pDX, IDC_EDIT_T10, m_ctrT10);rn DDX_Control(pDX, IDC_EDIT_T1, m_ctrT1);rn DDX_Text(pDX, IDC_EDIT_T1, m_strT1);rn DDX_Text(pDX, IDC_EDIT_T10, m_strT10);rn DDX_Text(pDX, IDC_EDIT_T2, m_strT2);rn DDX_Text(pDX, IDC_EDIT_T3, m_strT3);rn DDX_Text(pDX, IDC_EDIT_T4, m_strT4);rn DDX_Text(pDX, IDC_EDIT_T5, m_strT5);rn DDX_Text(pDX, IDC_EDIT_T6, m_strT6);rn DDX_Text(pDX, IDC_EDIT_T7, m_strT7);rn DDX_Text(pDX, IDC_EDIT_T8, m_strT8);rn DDX_Text(pDX, IDC_EDIT_T9, m_strT9);rn DDX_Text(pDX, IDC_EDIT_TIME, m_strTime);rn //AFX_DATA_MAPrnrnrnBEGIN_MESSAGE_MAP(CTempDlg, CDialog)rn //AFX_MSG_MAP(CTempDlg)rn ON_MESSAGE(WM_COMM_RXCHAR, OnCommunication)rn ON_WM_SYSCOMMAND()rn ON_WM_PAINT()rn ON_WM_QUERYDRAGICON()rn ON_BN_CLICKED(IDC_BUTTON_Send, OnBUTTONSend)rn ON_WM_TIMER()rn ON_EN_CHANGE(IDC_EDIT_TIME, OnChangeEditTime)rn //AFX_MSG_MAPrnEND_MESSAGE_MAP()rnrn/////////////////////////////////////////////////////////////////////////////rn// CTempDlg message handlersrnrnBOOL CTempDlg::OnInitDialog()rnrn CDialog::OnInitDialog();rnrn // Add "About..." menu item to system menu.rnrn // IDM_ABOUTBOX must be in the system command range.rn ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);rn ASSERT(IDM_ABOUTBOX < 0xF000);rnrn CMenu* pSysMenu = GetSystemMenu(FALSE);rn if (pSysMenu != NULL)rn rn CString strAboutMenu;rn strAboutMenu.LoadString(IDS_ABOUTBOX);rn if (!strAboutMenu.IsEmpty())rn rn pSysMenu->AppendMenu(MF_SEPARATOR);rn pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);rn rn rnrn // Set the icon for this dialog. The framework does this automaticallyrn // when the application's main window is not a dialogrn SetIcon(m_hIcon, TRUE); // Set big iconrn SetIcon(m_hIcon, FALSE); // Set small iconrn rn // TODO: Add extra initialization herern m_nBaud=9600;//波特率rn m_nCom=1;//串口号rn m_cParity='N';//奇偶校验rn m_nDatabits=8;//数据位rn m_nStopbits=1;//停止位rn m_dwCommEvents = EV_RXFLAG | EV_RXCHAR;rn CString strStatus;rn if (m_Port.InitPort(this, m_nCom, m_nBaud,m_cParity,m_nDatabits,m_nStopbits,m_dwCommEvents,512))rn rn m_Port.StartMonitoring();rn //"当前状态:串口打开,无奇偶校验,8数据位,1停止位");rn rn elsern rn AfxMessageBox("没有发现此串口");rn rn rn CEdit* pEdit=(CEdit*)GetDlgItem(IDC_EDIT_TIME);rn CString strText;rn strText.Format("%d",m_nCycleTime);rn pEdit->SetWindowText(strText); rnrn return TRUE; // return TRUE unless you set the focus to a controlrnrnrnvoid CTempDlg::OnSysCommand(UINT nID, LPARAM lParam)rnrn if ((nID & 0xFFF0) == IDM_ABOUTBOX)rn rn CAboutDlg dlgAbout;rn dlgAbout.DoModal();rn rn elsern rn CDialog::OnSysCommand(nID, lParam);rn rnrnrn// If you add a minimize button to your dialog, you will need the code belowrn// to draw the icon. For MFC applications using the document/view model,rn// this is automatically done for you by the framework.rnrnvoid CTempDlg::OnPaint() rnrn if (IsIconic())rn rn CPaintDC dc(this); // device context for paintingrnrn SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);rnrn // Center icon in client rectanglern int cxIcon = GetSystemMetrics(SM_CXICON);rn int cyIcon = GetSystemMetrics(SM_CYICON);rn CRect rect;rn GetClientRect(&rect);rn int x = (rect.Width() - cxIcon + 1) / 2;rn int y = (rect.Height() - cyIcon + 1) / 2;rnrn // Draw the iconrn dc.DrawIcon(x, y, m_hIcon);rn rn elsern rn CDialog::OnPaint();rn rnrnrn// The system calls this to obtain the cursor to display while the user dragsrn// the minimized window.rnHCURSOR CTempDlg::OnQueryDragIcon()rnrn return (HCURSOR) m_hIcon;rnrnLONG CTempDlg::OnCommunication(WPARAM ch, LPARAM port)rnrn CString str;rn str.Format("%02X ",ch);rn m_strRCV+=str;rn unsigned char dat[512];rnint a[512];rnint len1=Str2Hex(m_strRCV,dat);rnint i=0,k=0,j=0,n,l;rn//数据处理rnint f[512],d[512];rnn=len1/25;rnfor (l=0;l='0')&&(c='A')&&(c='a')&&(cGetWindowText(strText);rn m_nCycleTime=atoi(strText);rn rn
debug Assert Failed
我从CWnd派生了一个类,用于提示信息,为什么在调试模式下总是<em>出现</em>assert失败的错误?rnrnrn头文件(省略无关部分):rn/////////////////////////////////////////////////////////////////////////////rn// CYFTipWnd windowrnrnclass CYFTipWnd : public CWndrnrn// Constructionrnpublic:rn CYFTipWnd();rnrn// Attributesrnpublic:rnrn// Operationsrnpublic:rnrn// Overridesrn // ClassWizard generated virtual function overridesrn //AFX_VIRTUAL(CYFTipWnd)rn protected:rn virtual BOOL PreCreateWindow(CREATESTRUCT& cs);rn //AFX_VIRTUALrnrn// Implementationrnpublic:rn void SetContent(CString Text);rn virtual ~CYFTipWnd();rnrn // Generated message map functionsrnprotected:rn //AFX_MSG(CYFTipWnd)rn afx_msg void OnPaint();rn //AFX_MSGrn DECLARE_MESSAGE_MAP()rnprivate:rn CString m_Text;rn CFont m_Font;rn;rnrn源文件(省略无关部分):rnrnCYFTipWnd::CYFTipWnd()rnrn LOGFONT lf;rn memset(&lf, 0, sizeof(lf));rn lf.lfCharSet = GB2312_CHARSET;rn lf.lfHeight = 12;rn strcpy(lf.lfFaceName, "宋体");rn this->m_Font.CreateFontIndirect(&lf);rnrnrnCYFTipWnd::~CYFTipWnd()rnrnrnrnrnBEGIN_MESSAGE_MAP(CYFTipWnd, CWnd)rn //AFX_MSG_MAP(CYFTipWnd)rn ON_WM_PAINT()rn //AFX_MSG_MAPrnEND_MESSAGE_MAP()rnrnrnvoid CYFTipWnd::OnPaint() rnrn CPaintDC dc(this);rn CBrush BKBrush;rn BKBrush.CreateSolidBrush(GetSysColor(COLOR_INFOBK));rn CRect rcClient;rn this->GetClientRect(&rcClient);rn dc.FillRect(&rcClient, &BKBrush); rn CFont * pOldFont = dc.SelectObject(&this->m_Font);rn int OldBkMode = dc.SetBkMode(TRANSPARENT);rn dc.TextOut(2, 2, this->m_Text);rn dc.SetBkMode(OldBkMode);rn dc.SelectObject(pOldFont);rnrnrnBOOL CYFTipWnd::PreCreateWindow(CREATESTRUCT& cs) rnrn cs.style |= WS_BORDER;rn cs.lpszClass = AfxRegisterWndClass(NULL); rn return CWnd::PreCreateWindow(cs);rnrnrnvoid CYFTipWnd::SetContent(CString Text)rnrn this->m_Text = Text; rn CPaintDC dc(this);rn CFont * SaveFont = dc.SelectObject(&this->m_Font);rn CSize size = dc.GetTextExtent(Text);rn dc.SelectObject(SaveFont);rnrn CRect r;rnrn this->GetWindowRect(&r);rn if(r.Width() < size.cx || r.Height() < size.cy)rn rn r.bottom = r.top + size.cy;rn r.right = r.left + size.cx;rn this->MoveWindow(&r);rn rn rn this->GetClientRect(&r);rn this->InvalidateRect(&r);rnrn
debug assertion failed !
#include rn#include rnusing namespace std;rnrnclass stringxrnrn int m;rn char *str;rnpublic:rn stringx(int n=100):m(n)rn rn str=new char[m];rn rn ~stringx()rn rn delete str;rn str=NULL;rn rn stringx operator+=(stringx &s)rn rn m+=s.m;rn char *p=new char[m];rn strcpy(p,str);rn delete str;rn str=NULL;rn str=new char[m];rn strcpy(str,p);rn strcat(str,s.str);rn delete p;rn p=NULL;rn return *this;rn rn void putin()rn rn cout<>str;rn rn void dispaly()rn rn cout<nblockuse)rnrn 终止 重试 忽略
Debug assertion failed
Debug Assertion Failed!rnProgram: .....exernFile:afxcoll.inlrnLine:319rnrnFor information on how your program can cause anrnassertion failure, see the Visual C++ documentation on asserts.rnrn~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~rnrn程序运行一段时间过后,为什么会<em>出现</em>这个错误呢?rn
vc++ debug assertion failed
#define _CRT_SECURE_NO_WARNINGSrn#include rn#include rn#include rn#include rn#include rn#include rn#include rnrnstruct data_t rn unsigned first, second;rn double d1, d2;rn;rninline bool operator< b.first || (a.first == b.first && a.second < b.second);rnrninline std::ostream& operator<<< a.first << "\t" << a.second << "\t"rn << std::setprecision(18) << std::fixed << a.d1 << "\t"rn << std::setprecision(18) << std::fixed << a.d2;rnrnrnint main(int const arc, char const *arg[]) rn std::ifstream istr("in.txt");rn std::ofstream ostr("out.txt");rn std::vector data;rnrn // 读入rn std::ifstream istr(arg[1]);rn if (!istr) rn std::cerr << "无法打开输入文件\n";rn return __LINE__;rn rnrn std::string line;rn data_t tmp;rn std::streamsize num = 0;rn while (std::getline(istr, line)) rn ++num;rn if (sscanf(line.c_str(), "%u%*[^0-9]%u%*[^0-9\-]%lf%*[^0-9\-]%lf", &tmp.first, &tmp.second, &tmp.d1, &tmp.d2) != 4) rn std::cerr << "第" << num << "数据有误\n";rn return __LINE__;rn rn data.push_back(tmp);rn rn std::sort(data.begin(), data.end());rn rnrn // 输出rn std::ofstream ostr(arg[2]);rn if (!ostr) rn std::cerr << "无法打开输出文件\n";rn return __LINE__;rn rn for (size_t i = 0; i != data.size(); ++i) rn ostr << data[i] << "\n";rn rn rnrn return 0;rnrn这个程序编译连接都行 但是运行时<em>出现</em>这个情况[img=https://img-bbs.csdn.net/upload/201503/31/1427791767_915281.png][/img]
S3C2440 IIC操作下载
本程序可以实现S3C2440对AT24C02 IIC操作的读写数据,有详细注释,比较实用 相关下载链接:[url=//download.csdn.net/download/xxx331388/3141009?utm_source=bbsseo]//download.csdn.net/download/xxx331388/3141009?utm_source=bbsseo[/url]
淘宝前端UED资料-淘宝响应式WebUI设计实践.pdf下载
淘宝前端UED资料-淘宝响应式WebUI设计实践.pdf 淘宝UED团队打造高质量开发PPT 相关下载链接:[url=//download.csdn.net/download/mz121/4924455?utm_source=bbsseo]//download.csdn.net/download/mz121/4924455?utm_source=bbsseo[/url]
基于struts2 的上传下载源码下载
此源码是以java语言,struts2框架为基础编写的上传下载项目。 对于不会写上传下载功能的各位,是一个不错的入门代码。 相关下载链接:[url=//download.csdn.net/download/stardomain/5690587?utm_source=bbsseo]//download.csdn.net/download/stardomain/5690587?utm_source=bbsseo[/url]
相关热词 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池 c#5.0 安装程序 c# 分页算法
我们是很有底线的