VC6.0 c0000005异常。

project>>add to project>>files.程序直接未响应。
![图片说明](https://img-ask.csdn.net/upload/201604/12/1460435274_252928.png)图片说明

7个回答

问题解决了,去官网下载一个FileTool.exe.用VC6.0编译,生成一个FileTool动态链接库,复制到VC6.0安装文件夹的ADDIns下。
打开VC6.0,Tool->Customize->Add-ins and Macros Files,选中FileTool.
http://download.microsoft.com/download/vc60ent/s1/6.0/w9xnt4/en-us/filetool.exe

图片说明

一般都是内存的非法访问

你这是自问自答呢啊!

好,真的很不错!!!!!!!!

这个异常不是空指针未初始化吗

内存访问异常,一般是数组下标越界,或指针未初始化导致的。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
vc6.0程序运行异常,在A电脑可以,在B电脑不可以SetFormat
我有2台电脑A和B,我在初始化里加入了m_ShiJian1.SetFormat(_T("yyyy/MM/dd HH:mm:ss"));然后在电脑A中运行没有问题,在电脑B中运行程序就提示异常出错,无法运行。 出现下面的错误(有省略): Loaded 'ntdll.dll', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\kernel32.dll', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\KernelBase.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\MFC42D.DLL', no matching symbolic information found. Loaded symbols for 'C:\Windows\System32\MSVCRTD.DLL' Loaded 'C:\Windows\SysWOW64\gdi32.dll', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\user32.dll', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\advapi32.dll', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\msvcrt.dll', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\sechost.dll', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\sspicli.dll', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\cryptbase.dll', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\lpk.dll', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\usp10.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\MFCO42D.DLL', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\ole32.dll', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\oleaut32.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\MFCD42D.DLL', no matching symbolic information found. Loaded 'C:\Windows\System32\imm32.dll', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\msctf.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\MFC42LOC.DLL', no matching symbolic information found. Loaded 'C:\Windows\System32\uxtheme.dll', no matching symbolic information found. Loaded 'C:\Program Files\BLDBaseService\hgcounter.dll', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\psapi.dll', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\ws2_32.dll', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\nsi.dll', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\shlwapi.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\dwmapi.dll', no matching symbolic information found. Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18201_none_ec80f00e8593ece5\comctl32.dll', no matching symbolic information found. Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\comctl32.dll', no matching symbolic information found. Loaded 'F:\Users\Administrator\AppData\Local\Youdao\Dict\6.3.66.1117\WordStrokeHelper32.dll', no matching symbolic information found. Loaded 'F:\Users\Administrator\AppData\Local\Youdao\Dict\6.3.66.1117\TextExtractorImpl32.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\oleacc.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\winspool.drv', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\comdlg32.dll', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\shell32.dll', no matching symbolic information found. Loaded 'C:\Windows\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.18455_none_72d576ad8665e853\GdiPlus.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\msimg32.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\winmm.dll', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\clbcatq.dll', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\MSADODC.OCX', no matching symbolic information found. Loaded 'C:\Windows\System32\sxs.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\olepro32.dll', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\MSDATGRD.OCX', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\MSSTDFMT.DLL', no matching symbolic information found. Loaded 'C:\Program Files (x86)\Common Files\System\ado\msado15.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\msdart.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\cryptsp.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\rsaenh.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\RpcRtRemote.dll', no matching symbolic information found. Loaded 'C:\Program Files (x86)\Common Files\System\Ole DB\oledb32.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\bcrypt.dll', no matching symbolic information found. Loaded 'C:\Program Files (x86)\Common Files\System\Ole DB\oledb32r.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\comsvcs.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\atl.dll', no matching symbolic information found. Loaded 'C:\Windows\SysWOW64\bcryptprimitives.dll', no matching symbolic information found. Loaded 'C:\Program Files (x86)\Common Files\System\Ole DB\msdasql.dll', no matching symbolic information found. Loaded 'C:\Program Files (x86)\Common Files\System\Ole DB\msdatl3.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\odbc32.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\odbcint.dll', no matching symbolic information found. Loaded 'C:\Program Files (x86)\Common Files\System\Ole DB\msdasqlr.dll', no matching symbolic information found. Loaded 'C:\Program Files (x86)\MySQL\Connector ODBC 5.3\myodbc5w.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\secur32.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\msvcr100.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\odbccp32.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\version.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\nlaapi.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\NapiNSP.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\pnrpnsp.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\mswsock.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\dnsapi.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\winrnr.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\wshbth.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\rasadhlp.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\WSHTCPIP.DLL', no matching symbolic information found. Loaded 'C:\Windows\System32\wship6.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\IPHLPAPI.DLL', no matching symbolic information found. Loaded 'C:\Windows\System32\winnsi.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\FWPUCLNT.DLL', no matching symbolic information found. Loaded 'C:\Program Files (x86)\Common Files\System\msadc\msadce.dll', no matching symbolic information found. Loaded 'C:\Program Files (x86)\Common Files\System\msadc\msadcer.dll', no matching symbolic information found. Loaded 'C:\Program Files (x86)\Common Files\System\Ole DB\msdaps.dll', no matching symbolic information found. Loaded 'C:\Program Files (x86)\Common Files\System\ado\msader15.dll', no matching symbolic information found. Loaded 'C:\Windows\System32\apphelp.dll', no matching symbolic information found. The thread 0x4478 has exited with code 0 (0x0).
VC6.0异常代码c0000005是什么原因,具体代码如下
#include<stdio.h> #include<stdlib.h> #define LEN sizeof(struct student) struct student { int num; int score; struct student *next; }; int n=0; struct student *creat() { struct student *head=NULL,*p1,*p2; p1=p2=(struct student*)malloc(LEN); scanf("%d %d",&p1->num,&p1->score); while(p1->num!=0) { n++; if(n==1)head=p1; else p2->next=p1; p2=p1; p1=(struct student*)malloc(LEN); scanf("%d %d",&p1->num,&p1->score); } p2->next-NULL; free(p1); return head; } int main() { struct student *pt; pt=creat(); while(pt!=NULL) { printf("num:%d sore:%d\n",pt->num,pt->score); pt=pt->next; } return 0; }
VC6.0程序报错dll异常
MFC程序,运行时点击按钮报运行错误。 中断后启动调试,发现是在comip.h中执行_com_issue_error(hr)报错(FAILED(hr)成立)。 错误信息:unhandled exception in *.exe(KERNELBASE.DLL)0xE06D7363:Microsoft C++ Exception 尝试去更新dll失败(提示文件被打开)
VC6.0运行没问题的程序为什么到了VS2010里就运行异常了?
![图片说明](https://img-ask.csdn.net/upload/201608/06/1470464082_976215.png) 代码如下,一个基于控制台的计算器程序,异常原因好像是string类溢出? 小白一枚,平常在学校学的是VC6.0,并不清楚两种开发软件有什么区别也不知道该怎么改,求大神指点!! #include "StdAfx.h" #include<iostream> #include<cmath> #include<string> #include<iomanip> using namespace std; double D_Operate(double x,char op,double y)//双目运算符的运算定义 { double a; switch(op) { case'+': a=x+y;break; case'-': a=x-y;break; case'*': a=x*y;break; case'/': a=x/y;break; case'^': a=pow(x,y);break; } return a; } double S_Operate(char op,double x)//前缀单目运算符的运算定义 { double a; switch(op) { case's': a=sin(x);break; case'c': a=cos(x);break; case't': a=tan(x);break; case'l': a=log10(x);break; case'n': a=log(x);break; case'_': a=-x;break;//取负用下划线代替负号 定义为一元运算 } return a; } char Precede(char op1,char op2)//判断符号的优先级 op1在返回的结果符的左边 op2在右边 //用于判定运算符的优先级 以决定是把运算符压栈 还是把栈内的运算符弹出来进行计算 { if(((op1=='+'||op1=='-')&&(op2=='+'||op2=='-'||op2==')'||op2=='='))||\ ((op1=='*'||op1=='/')&&(op2=='+'||op2=='-'||op2=='*'||op2=='/'||op2==')'||op2=='='))\ ||(op1=='^'&&(op2=='+'||op2=='-'||op2=='*'||op2=='/'||op2==')'||op2=='='||op2=='s'||op2=='c'||op2=='t'||op2=='_'||op2=='l'||op2=='n'))\ ||((op1=='_'||op1=='s'||op1=='c'||op1=='t'||op1=='l'||op1=='n')&&(op2=='+'||op2=='-'||op2=='*'||op2=='/'||op2==')'||op2=='='||op2=='s'||op2=='c'||op2=='t'||op2=='_'||op2=='l'||op2=='n'))) return '>';//上述情况下 栈顶运算符优先级高于待定运算符 需弹栈 if((op1=='('&&op2==')')||(op1=='='&&op2=='=')) return '='; else return '<'; } int illegal_char(string s,int i)//非法输入字符判定函数 { int j=0; while(j<i) { if(s[j]>='0'&&s[j]<='9') j++; else if(s[j]=='+'||s[j]=='-'||s[j]=='*'||s[j]=='/'||s[j]=='.'||s[j]=='('||s[j]==')'||s[j]=='^'||s[j]=='!'||s[j]=='e'||s[j]=='_') j++; else if((s[j]=='p'&&s[j+1]=='i')||(s[j]=='l'&&s[j+1]=='n')) j+=2; else if((s[j]=='s'&&s[j+1]=='i'&&s[j+2]=='n')||(s[j]=='c'&&s[j+1]=='o'&&s[j+2]=='s')||(s[j]=='t'&&s[j+1]=='a'&&s[j+2]=='n')||(s[j]=='l'&&s[j+1]=='o'&&s[j+2]=='g')) j+=3; else { cout<<"ERROR:存在非法字符输入"<<endl; return 0; } } return 1;//没有非法字符 返回1 否则返回0 } int match(string s)//栈结构的括号匹配检测函数 { int i=0,top=0; char stack[50]; while(s[i]!='\0') { if(s[i]=='(') { stack[top]=s[i]; top++; }//push 左括号压入栈内 if(s[i]==')') if(stack[top-1]=='(') { int a=i+1; stack[top-1]=NULL; top--; }//把与右括号匹配的左括号弹掉 else { cout<<"ERROR:括号输入有误"<<endl; return 0;//多了右括号 括号失陪 返回非法 }//pop'(' i++; } if (top!=0) { cout<<"ERROR:括号输入有误"<<endl; return 0;//多了左括号 括号失陪 返回非法 } return 1;//返回合法 } class NUMstack//运算数栈 { public: double num[1000]; int top; void start()//初始化栈清空栈顶指针置底 { for(int i=0;i<1000;i++) num[i]=0; top=0; } void push(char a)//因为有多位数的运算因此不能一压栈就提升栈顶指针 { num[top]=num[top]*10+(a-'0'); } double pop()//弹栈函数 弹掉栈顶元素 栈顶归0 top指针下降 { top--; double number=num[top]; num[top]=0; return number; } double getTop()//取栈顶元素但不必弹栈 { return num[top-1]; } void lift()//提升top指针的函数 { top++; } }; class OPERstack//运算符栈 { public: char oper[1000]; int top; void start()//初始化函数栈清空栈底放一"="用于判定算式结束 { oper[0]='='; for(int i=1;i<1000;i++) oper[i]=NULL; top=1; } void push(char a)//与数字栈不同一压栈就可以提升指针 { oper[top]=a; top++; } char pop()//弹出计算符 用于计算 { top--; char op=oper[top]; oper[top]=NULL; return op; } char getTop()//取栈顶符号 但不弹栈 可用于判定优先级 { return oper[top-1]; } }; void calculate(string equation)//算式计算函数(关键函数) { NUMstack number;//定义运算数栈变量number OPERstack oper;//定义运算符栈变量oper number.start(); oper.start();//把两个栈初始化 int i=0,len=0,k; char p,sig; double yuan1,yuan2; while(equation[i]!='\0') { len++; i++; }//计算等式长度len if(equation[len-1]!='=') { cout<<"ERROR:未输入等号"<<endl; return;//检测有没有结束符等号"=" } int le; le=illegal_char(equation,len-1); if(le==0) return;//有非法字符 不进行后续计算 le=match(equation); if(le==0) return;//括号匹配非法 不进行后续计算 for(i=0;i<len;i++)//初步确定合法后开始计算算式 { if(equation[i]=='!')//阶乘是后缀单目运算符单独进行计算 { yuan1=number.pop();//弹出栈顶元素做阶乘 if (yuan1==0) { number.num[number.top]=0;//0的阶乘为0 压结果入栈 number.lift(); } else { number.num[number.top]=1; for(k=1;k<=yuan1;k++)//阶乘循环 number.num[number.top]=k*number.num[number.top]; number.lift();//结果入站 } } else if(equation[i]>='0'&&equation[i]<='9') { number.push(equation[i]);//压数字字符入栈 if((equation[i+1]<'0'||equation[i+1]>'9')&&equation[i+1]!='.') number.lift();//当整个多位运算数读取完毕后,运算数栈栈顶指针才能提升 } else if(equation[i]=='p') { number.num[number.top]=3.1415926536;//pi值即π 圆周率 要压入数字栈 number.lift(); i++;//pi是两个字符所以要移动扫描算式的指针往后跳一个 } else if(equation[i]=='e') { number.num[number.top]=2.718281828459;//e 自然对数底数 压入运算数栈 number.lift(); } else if(equation[i]=='.')//小数压栈代码 { int x=1; while(equation[i+x]>='0'&&equation[i+x]<='9') { number.num[number.top]+=((equation[i+x]-'0')/pow(10.0,x));//第x位小数入栈 x++; } x--; number.lift(); i=i+x; } else if(equation[i]=='(') { oper.push(equation[i]);//左括号无条件压栈 } else//数阶乘左括号判断完毕后其他运算符的分类讨论 { if(oper.top==1)//运算符栈为空运算符可以无条件入栈 { if(equation[i]=='l'&&equation[i+1]=='o') oper.push('l'); else if(equation[i]=='l'&&equation[i+1]=='n') oper.push('n');//因为log和ln都是小写字母l开头所以要分情况讨论 else oper.push(equation[i]); } else//运算符栈不为空则要进行优先级判断 { char temp1=oper.getTop();//取出栈顶符号 char temp2;//待入栈符号 if(equation[i]=='l'&&equation[i+1]=='o') temp2='l'; else if(equation[i]=='l'&&equation[i+1]=='n') temp2='n';//log与ln的再次讨论 else temp2=equation[i]; p=Precede(temp1,temp2); if(p=='<') oper.push(temp2);//栈顶符优先级较低现在待定的运算符就可以入栈了 if(p=='>'||p=='=') { char rep=p;//当栈顶符优先级不低于待入栈的符号 则运算符栈不停地弹栈 //进行运算直到低于待入栈符号为止 rep用于记录比较结果 要多次进行判断 while((rep=='>'||p=='=')&&(oper.top-1>0)) { sig=oper.pop(); yuan1=number.pop(); yuan2=number.getTop();//靠前的一个运算数只要取得不要弹出来 if(sig=='/'&&yuan1==0)//yuan1是双目运算符后面的第二运算元 { cout<<"ERROR:除数为零"<<endl; return; } if(sig=='^'&&yuan2<0&&yuan1>0&&yuan1<1&&(static_cast <int>(1/yuan1))%2==0)//对负数开偶次根号的限制 { cout<<"ERROR:负数开偶次根号"<<endl; return; } if(sig=='_'||sig=='s'||sig=='c'||sig=='t'||sig=='l'||sig=='n')//若为前缀单目运算符 { double tt; tt=S_Operate(sig,yuan1); number.num[number.top]=tt;//运算结果压回原来yuan1在栈内的位置 number.lift();//提升指针 temp1=oper.getTop(); rep=Precede(temp1,temp2);//再判优先级 } else { number.num[(number.top)-1]=D_Operate(yuan2,sig,yuan1); temp1=oper.getTop(); rep=Precede(temp1,temp2);//双目运算符的计算 } } if(equation[i]==')')//如果栈外符是右括号要把与之匹配的左括号弹出栈外 oper.pop(); else if(equation[i]=='l'&&equation[i+1]=='o') oper.push('l');//代表log的l else if((equation[i]=='l')&&(equation[i+1]=='n')) oper.push('n');//代表ln的n else oper.push(equation[i]); } } if(equation[i]=='s'||equation[i]=='c'||equation[i]=='t'||(equation[i]=='l'&&equation[i+1]=='o')) i=i+2; if(equation[i]=='l'&&equation[i+1]=='n') i++;//对于不止一个字符的运算符 sin log ln等等 要移动扫描算式的指针 往后跳一个或两个 } } if(number.num[0]==ceil(number.num[0])) cout<<equation<<number.num[0]<<endl; else cout<<equation<<fixed<<setprecision(8)<<number.num[0]<<endl;//输出结果控制精度8位小数 //调试时检查运算结束后栈内情况的代码 } void main() { system("cls"); string equation; cout<<endl<<endl<<"请输入算式,以等号结束:"<<endl; cin>>equation; calculate(equation); system("cls"); main(); }
vc++6.0编译代码输入中文异常
![图片说明](https://img-ask.csdn.net/upload/201811/01/1541032425_162113.png)输入中文没有备选字
在 System.AccessViolationException 中第一次偶然出现的“.exe”类型的异常
今天调试一个共享内存小程序,其中用到了CreateProcess()创建线程,程序编译没有错误,但是运行时总是崩溃,整了半天没找出问题所在,只能求救于大神了。程序的输出信息如下 “shareMemory0418.exe”(托管): 已加载“C:\windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll” “shareMemory0418.exe”(托管): 已加载“d:\work\shareMemory0418\Debug\shareMemory0418.exe”,符号已加载。 “shareMemory0418.exe”(托管): 已加载“C:\windows\WinSxS\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.21022.8_none_96748342450f6aa2\msvcm90d.dll”,符号已加载。 “shareMemory0418.exe”(托管): 已加载“C:\windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll” “shareMemory0418.exe”(托管): 已加载“C:\windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll” “shareMemory0418.exe”(托管): 已加载“C:\windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll” “shareMemory0418.exe”(托管): 已加载“C:\windows\assembly\GAC_MSIL\mscorlib.resources\2.0.0.0_zh-CHS_b77a5c561934e089\mscorlib.resources.dll” 在 System.AccessViolationException 中第一次偶然出现的“shareMemory0418.exe”类型的异常 程序“[4544] shareMemory0418.exe: 托管”已退出,返回值为 -1073741819 (0xc0000005)。
VC++ 故障模块名称: MFC42.DLL 故障模块
程序运行环境: 1. xp sp3专业版 2. win7 sp1 专业版 3. xp sp3专业版 + vc++6.0完整安装 以上三种环境都没有解决问题。 目前只剩下安装包,没有源代码。 a. 这个问题出现的原因是什么 b. 靠谱的解决办法 -------------------------------------------------------- 补充一下, 我之所以更换系统就是怀疑有兼容性问题,但是在win7和xp下报错都是一样的,甚至连错误偏移地址都是一样的 问题签名: 问题事件名称: APPCRASH 应用程序名: FPC_MC3.exe 应用程序版本: 1.0.0.1 应用程序时间戳: 579edcd0 故障模块名称: MFC42.DLL 故障模块版本: 6.0.9782.0 故障模块时间戳: 404006c5 异常代码: c0000005 异常偏移: 00004692 OS 版本: 6.1.7601.2.1.0.768.2 区域设置 ID: 2052 其他信息 1: 0a9e 其他信息 2: 0a9e372d3b4ad19135b953a78882e789 其他信息 3: 0a9e 其他信息 4: 0a9e372d3b4ad19135b953a78882e789
用vc++6.0做通讯录出现问题
#include < iostream> #include < iomanip> #include < fstream> #include < string> #include < cstdlib> #include"utility.h" using namespace std; struct TelephoneType { //电话结构 bool delTag; //删除标志 unsigned int seat; //序号 char name[16]; //姓名 char teleNo[18]; //电话号码 }; //电话号码簿类的声明 class TelephoneBook{ private: //数据成员 fstream file; //电话号码簿文件 //辅助函数 public: //构造函数,析构函数与方法 TelephoneBook(); //无参构造函数 virtual ~TelephonrBook(){file.close(); //析构函数 void Run(); //处理电话号码簿 void AddData(); //增加数据 void UpdateData(); //更新数据 void SearchData(); //查询数据 void DeleteData(); //删除数据,制作删除标志 void pack(); //在物理上删除作有删除标志的记录 }; TelephoneBook::TelephoneBook() //无参构造函数 { ifstream iFile("telph.dat"); //建立输入文件 if(iFile.fail()) { //打开文件失败,表示不存在文件 ofstream oFile("telph.dat"); //建立输出文件 if(oFile.fail()) throw("打开文件失败!"); //抛出异常 oFile.close(); //关闭文件 } else { //存在文件 iFile.close(); //关闭文件 } //在构造函数中,应以读写二进制方式打开数据文件,具体语句为 file.open("telph.dat",ios::in|ios::out|ios::binary); //以读写方式打开文件 if(file.fail()) throw("打开文件失败!"); //抛出异常 } void TelephoneBook::AddData() //增加数据 { TelephoneType telph; //电话号码记录 telph.delTag=flase; //正常,未作删除标记 do { cout<<"输入序号:"; cin>>telph.seat; //输入序号 cout<<"输入姓名:"; cin>>telph.name; //输入姓名 cout<<"输入电话号码:"; cin>>telph.teleNO; //输入电话号码 file.write((char*)&telph,sizeof(TelephoneType)); //写入文件 cout<<"继续添加吗?"; } while(UserSaysYes()); //肯定回答时循环 } void TelephoneBook::UpdateData() //更新数据 { TelephoneType telph; //电话号码结构 unsigned int seat; //序号 cout<<"输入要更新电话序号:"; cin>>seat; //输入序号 file.seekg(0); //定位 file.read((char*)&telph,sizeof(TelephoneType)); //读记录 while(!file.eof()) { //文件未结束 if(telph.seat==seat //序号相同 &&!telph.delTag) //记录正常,未作删除标识 break; //查询成功 file.read((char*)&telph,sizeof(TelephoneType)); //读记录 } if(!file.eof()) { //查询成功 cout<<setw(18)<<telph.seat<<setw(18)<<telph.name<<setw(18)<<telph.teleNo<<endl; //输出记录 cout<<"输入更新后的数据:"<<endl; cout<<"输入序号:"; cin>>telph.seat; //输入序号 cout<<"输入姓名:"; cin>>telph.name; //输入姓名 cout<<"输入电话号码:"; cin>>telph.teleNO; //输入电话号码 file.seekg(-sizeof(TelephoneType),ios::cur); //定位 file.write((char*)&telph,sizeof(TelephoneType)); //写入记录 } else { //查询失败 cout<<"无此序号的记录!"; file.clear(); //清除文件结束标志 file.seekg(0); //定位 file.read((char*)&telph,sizeof(TelephoneType)); //读记录 } } void TelephoneBook::SearchData() { TelephoneType telph; unsigned int seat; cout<<"输入要查询的电话的序号"; cin>>seat; while(!file.eof()) { //文件未结束 if(telph.seat==seat //序号相同 &&!telph.delTag) //记录正常,未作删除标识 break; //查询成功 file.read((char*)&telph,sizeof(TelephoneType)); //读记录 } if(!file.eof()) { //查询成功 cout<<setw(18)<<telph.seat<<setw(18)<<telph.name<<setw(18)<<telph.teleNo<<endl; //输出记录 } else { //查询失败 cout<<"无此序号的记录!"; file.clear(); //清除文件结束标志 } } void TelephoneBook::DeleteData() // 删除数据只作删除标志 { TelephoneType telph; //电话号码结构 unsigned int seat; //序号 cout<<"输入要删除电话的序号:"; cin>>seat; //输入序号 file.seekt(0); //定位 file.read((char *)&telph,sizeof(TelephoneType)); //读记录 while (!file.eof()) { //文件未结束 if (telph.seat==seat //序号相同 &&!telph.delTag) //记录正常,未作删除标识 break; //查询成功 file.read((char*)&telph,sizeof(TelephoneType)); //读记录 } if (!file.eof()) { //查询成功 cout<<"被删除记录为:"<<endl; cout<<setw(18)<<telph.seat<<setw(18)<<telph.name<<setw(18)<<telph.teleNo<<endl; //输出记录 telph.delTag=true; //删除标志 file.seekg(-sizeof(TelephoneType),ios::cur); //定位 file.write((char*)&telph,sizeof(TelephoneType)); //写入记录 cout<<"删除成功!"<<endl; } else { //查询失败 cout<<"删除失败!"<<endl; file.clear(); //清除文件结束标志 } } void TelephoneBook::Pack() //在物理上删除作有删除标记的记录 { ofstream outFile("tem.dat",ios::app|ios::binary); //建立输出文件对象 TelephoneType telph; //电话号码结构 file.seekg(0); //定位 file.read((char*)&telph,sizeof(TelephoneType)); //读记录 while(!file.eof()) { //文件未结束 if(!telph.delTag) { //记录正常。未作删除标记 outFile.write((char*))&telph,sizeof(TelephoneType));//写记录 } file.read((char*)&telph,sizeof(TelephoneType)); //继续记录 } file.close(); //关闭文件 outFile.close(); //关闭文件 remove("telph.dat"); //删除文件 rename("tem.dat","telph.dat"); //更改文件名 file.open("telph,dat",ios::in|ios::out|ios::binary); //重新打开文件夹 } void TelephoneBook::Run() //处理电话号码簿 { int select; //选择菜单号 do{ cout<<"请选择:"<<endl; cout<<"1、增加数据"<<endl; cout<<"2、更新数据"<<endl; cout<<"3、查询数据"<<endl; cout<<"4、删除数据"<<endl; cout<<"5、重组文件"<<endl; cout<<"6、退出"<<endl; cin>>select; //输入选择 while(cin.get()!='\n'); //跳过当前行后面的字符 switch(select) { case 1: AddData(); //增加数据 break; case 2: UpdateData(); //更新数据 break; case 3: SearchData(); //查询数据 break; case 4: DeleteData(); //删除数据 break; case 5: Pack(); //在物理上删除作有删除标记的记录 break; } } while(select!=6); //选择6将推出 } int main() { try //用try封装可能出现异常的代码 { TelephoneBook objTelephoneBook; //电话号码簿对象 objTelephoneBook.Run(); //处理电话号码簿 } catch(Error err) //捕捉并处理异常 { err.show(); //显示异常信息 } system("PAUSE"); //调用库函数system() return 0; } error C2872: 'fstream' : ambiguous symbol error C2523: 'TelephoneBook::~TelephonrBook' : destructor tag mismatch error C2535: '__thiscall TelephoneBook::TelephoneBook(void)' : member function already defined or declared see declaration of 'TelephoneBook::TelephoneBook' fatal error C1004: unexpected end of file found
重量级问题!!java出了一个异常!环境是MyEclipse7.0 tomcate自带那个!
spring3.0+ibatis2.3.4+struts2.3.18+jmesa 异常如下: # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d38953c, pid=4052, tid=3392 # # JRE version: 6.0_17-b04 # Java VM: Java HotSpot(TM) Client VM (14.3-b01 mixed mode windows-x86 ) # Problematic frame: # C [jdwp.dll+0x953c] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # --------------- T H R E A D --------------- Current thread (0x0b29b000): JavaThread "http-8080-2" daemon [_thread_in_native, id=3392, stack(0x0c140000,0x0c190000)] siginfo: ExceptionCode=0xc0000005, reading address 0x00000045 Registers: EAX=0x00000000, EBX=0x0b39f280, ECX=0x00000006, EDX=0x00000004 ESP=0x0c18d40c, EBP=0x0c18d42c, ESI=0x00000045, EDI=0x0b6ed560 EIP=0x6d38953c, EFLAGS=0x00010202 Top of Stack: (sp=0x0c18d40c) 0x0c18d40c: 0c18d49c 6d3a114c 0b29b110 0b39f3d4 0x0c18d41c: 0b6d4530 0b5848c0 000017b4 0000050a 0x0c18d42c: 0c18d464 6d38de64 0b29b110 0ab1a850 0x0c18d43c: 0ab1d418 00000000 6d398cbf 008454e8 0x0c18d44c: 0ab1d418 00000000 6d38d700 0ab1d418 0x0c18d45c: 0c18d464 00000027 0c18d4d4 6d38e61b 0x0c18d46c: 0b29b110 008454e8 0ab1d418 008454e8 0x0c18d47c: 0ab1f544 0c18d49c 00000000 00000038 Instructions: (pc=0x6d38953c) 0x6d38952c: 0c 18 89 4d ec 8b 0d 80 42 3a 6d 8d 3c 08 eb 17 0x6d38953c: ff 36 ff 75 f0 ff 75 08 e8 d0 02 01 00 83 c4 0c Stack: [0x0c140000,0x0c190000], sp=0x0c18d40c, free space=309k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [jdwp.dll+0x953c] C [jdwp.dll+0xde64] C [jdwp.dll+0xe61b] V [jvm.dll+0x13c92f] V [jvm.dll+0xe9c33] j java.lang.ClassLoader.findBootstrapClass0(Ljava/lang/String;)Ljava/lang/Class;+19 j java.lang.ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+32 J java.lang.ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; J sun.misc.Launcher$AppClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; J java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class; J org.apache.catalina.loader.WebappClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; J org.apache.catalina.loader.WebappClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class; J java.lang.ClassLoader.loadClassInternal(Ljava/lang/String;)Ljava/lang/Class; v ~StubRoutines::call_stub V [jvm.dll+0xecf9c] V [jvm.dll+0x1741d1] V [jvm.dll+0xed34a] V [jvm.dll+0xed43a] V [jvm.dll+0x1b647b] V [jvm.dll+0x1b69be] V [jvm.dll+0x1b6d75] V [jvm.dll+0x1b6dbb] V [jvm.dll+0x9ef96] V [jvm.dll+0x59a42] V [jvm.dll+0x5aea0] V [jvm.dll+0x5b1ee] v ~RuntimeStub::load_klass_patching Runtime1 stub J org.jmesa.worksheet.WorksheetImpl.getRow(Lorg/jmesa/worksheet/UniqueProperty;)Lorg/jmesa/worksheet/WorksheetRow; J org.jmesa.facade.WorksheetWrapper.getRow(Lorg/jmesa/worksheet/UniqueProperty;)Lorg/jmesa/worksheet/WorksheetRow; J org.jmesa.worksheet.editor.AbstractWorksheetEditor.getWorksheetColumn(Ljava/lang/Object;Ljava/lang/String;)Lorg/jmesa/worksheet/WorksheetColumn; J org.jmesa.worksheet.editor.HtmlWorksheetEditor.getValue(Ljava/lang/Object;Ljava/lang/String;I)Ljava/lang/Object; J org.jmesa.view.html.renderer.HtmlCellRendererImpl.render(Ljava/lang/Object;I)Ljava/lang/Object; J org.jmesa.view.html.HtmlSnippetsImpl.body()Ljava/lang/String; j org.jmesa.view.html.HtmlView.render()Ljava/lang/Object;+103 j org.jmesa.facade.tag.TableFacadeTag.doTag()V+414 j org.apache.jsp.view.HSManage.HSBatchEditLwS01_jsp._jspx_meth_jmesa_005fstruts2TableFacade_005f0(Ljavax/servlet/jsp/PageContext;)Z+94 j org.apache.jsp.view.HSManage.HSBatchEditLwS01_jsp._jspService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+1013 j org.apache.jasper.runtime.HttpJspBase.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+3 j javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+30 j org.apache.jasper.servlet.JspServletWrapper.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Z)V+395 j org.apache.jasper.servlet.JspServlet.serviceJspFile(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/String;Ljava/lang/Throwable;Z)V+134 j org.apache.jasper.servlet.JspServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+436 j javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+30 j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+374 j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+101 j org.apache.catalina.core.ApplicationDispatcher.invoke(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lorg/apache/catalina/core/ApplicationDispatcher$State;)V+393 j org.apache.catalina.core.ApplicationDispatcher.processRequest(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lorg/apache/catalina/core/ApplicationDispatcher$State;)V+64 j org.apache.catalina.core.ApplicationDispatcher.doForward(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+385 j org.apache.catalina.core.ApplicationDispatcher.forward(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+55 j org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(Ljava/lang/String;Lcom/opensymphony/xwork2/ActionInvocation;)V+263 j org.apache.struts2.dispatcher.StrutsResultSupport.execute(Lcom/opensymphony/xwork2/ActionInvocation;)V+19 j com.opensymphony.xwork2.DefaultActionInvocation.executeResult()V+47 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+221 j com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+201 j com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+10 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+6 j org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+202 j com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+10 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+200 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+164 j com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+10 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+164 j com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+10 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+524 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.interceptor.MultiselectInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+121 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.interceptor.CheckboxInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+197 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.interceptor.FileUploadInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+90 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+73 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+179 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+322 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+178 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+106 j com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+10 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+466 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+228 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+524 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+1 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.lfpost.struts.interceptor.PermissionInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+89 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.lfpost.struts.interceptor.LoginInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+75 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.impl.StrutsActionProxy.execute()Ljava/lang/String;+20 ...<more frames>... Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j java.lang.ClassLoader.findBootstrapClass0(Ljava/lang/String;)Ljava/lang/Class;+19 j java.lang.ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+32 J java.lang.ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; J sun.misc.Launcher$AppClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; J java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class; J org.apache.catalina.loader.WebappClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; J org.apache.catalina.loader.WebappClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class; J java.lang.ClassLoader.loadClassInternal(Ljava/lang/String;)Ljava/lang/Class; v ~StubRoutines::call_stub v ~RuntimeStub::load_klass_patching Runtime1 stub J org.jmesa.worksheet.WorksheetImpl.getRow(Lorg/jmesa/worksheet/UniqueProperty;)Lorg/jmesa/worksheet/WorksheetRow; J org.jmesa.facade.WorksheetWrapper.getRow(Lorg/jmesa/worksheet/UniqueProperty;)Lorg/jmesa/worksheet/WorksheetRow; J org.jmesa.worksheet.editor.AbstractWorksheetEditor.getWorksheetColumn(Ljava/lang/Object;Ljava/lang/String;)Lorg/jmesa/worksheet/WorksheetColumn; J org.jmesa.worksheet.editor.HtmlWorksheetEditor.getValue(Ljava/lang/Object;Ljava/lang/String;I)Ljava/lang/Object; J org.jmesa.view.html.renderer.HtmlCellRendererImpl.render(Ljava/lang/Object;I)Ljava/lang/Object; J org.jmesa.view.html.HtmlSnippetsImpl.body()Ljava/lang/String; j org.jmesa.view.html.HtmlView.render()Ljava/lang/Object;+103 j org.jmesa.facade.tag.TableFacadeTag.doTag()V+414 j org.apache.jsp.view.HSManage.HSBatchEditLwS01_jsp._jspx_meth_jmesa_005fstruts2TableFacade_005f0(Ljavax/servlet/jsp/PageContext;)Z+94 j org.apache.jsp.view.HSManage.HSBatchEditLwS01_jsp._jspService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+1013 j org.apache.jasper.runtime.HttpJspBase.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+3 j javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+30 j org.apache.jasper.servlet.JspServletWrapper.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Z)V+395 j org.apache.jasper.servlet.JspServlet.serviceJspFile(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/String;Ljava/lang/Throwable;Z)V+134 j org.apache.jasper.servlet.JspServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+436 j javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+30 j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+374 j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+101 j org.apache.catalina.core.ApplicationDispatcher.invoke(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lorg/apache/catalina/core/ApplicationDispatcher$State;)V+393 j org.apache.catalina.core.ApplicationDispatcher.processRequest(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lorg/apache/catalina/core/ApplicationDispatcher$State;)V+64 j org.apache.catalina.core.ApplicationDispatcher.doForward(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+385 j org.apache.catalina.core.ApplicationDispatcher.forward(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+55 j org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(Ljava/lang/String;Lcom/opensymphony/xwork2/ActionInvocation;)V+263 j org.apache.struts2.dispatcher.StrutsResultSupport.execute(Lcom/opensymphony/xwork2/ActionInvocation;)V+19 j com.opensymphony.xwork2.DefaultActionInvocation.executeResult()V+47 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+221 j com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+201 j com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+10 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+6 j org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+202 j com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+10 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+200 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+164 j com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+10 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+164 j com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+10 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+524 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.interceptor.MultiselectInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+121 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.interceptor.CheckboxInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+197 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.interceptor.FileUploadInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+90 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+73 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+179 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+322 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+178 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+106 j com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+10 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+466 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+228 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+524 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+1 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.lfpost.struts.interceptor.PermissionInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+89 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j com.lfpost.struts.interceptor.LoginInterceptor.intercept(Lcom/opensymphony/xwork2/ActionInvocation;)Ljava/lang/String;+75 j com.opensymphony.xwork2.DefaultActionInvocation.invoke()Ljava/lang/String;+82 j org.apache.struts2.impl.StrutsActionProxy.execute()Ljava/lang/String;+20 j org.apache.struts2.dispatcher.Dispatcher.serviceAction(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/ServletContext;Lorg/apache/struts2/dispatcher/mapper/ActionMapping;)V+212 j org.apache.struts2.dispatcher.FilterDispatcher.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V+285 j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+117 j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+101 j org.apache.catalina.core.StandardWrapperValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+794 j org.apache.catalina.core.StandardContextValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+285 j org.apache.catalina.core.StandardHostValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+64 j org.apache.catalina.valves.ErrorReportValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+6 j org.apache.catalina.core.StandardEngineValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+42 j org.apache.catalina.connector.CoyoteAdapter.service(Lorg/apache/coyote/Request;Lorg/apache/coyote/Response;)V+157 j org.apache.coyote.http11.Http11Processor.process(Ljava/net/Socket;)V+432 j org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Ljava/net/Socket;)Z+82 j org.apache.tomcat.util.net.JIoEndpoint$Worker.run()V+41 j java.lang.Thread.run()V+11 v ~StubRoutines::call_stub --------------- P R O C E S S --------------- Java Threads: ( => current thread ) 0x0b46f800 JavaThread "pool-1-thread-1" [_thread_blocked, id=1668, stack(0x0c2d0000,0x0c320000)] 0x0b45a400 JavaThread "http-8080-6" daemon [_thread_blocked, id=3436, stack(0x0c280000,0x0c2d0000)] 0x0b466800 JavaThread "http-8080-5" daemon [_thread_in_native, id=3184, stack(0x0c230000,0x0c280000)] 0x0b69a800 JavaThread "http-8080-4" daemon [_thread_blocked, id=4068, stack(0x0c1e0000,0x0c230000)] 0x0b898000 JavaThread "http-8080-3" daemon [_thread_blocked, id=2748, stack(0x0c190000,0x0c1e0000)] =>0x0b29b000 JavaThread "http-8080-2" daemon [_thread_in_native, id=3392, stack(0x0c140000,0x0c190000)] 0x0b31d400 JavaThread "MySQL Statement Cancellation Timer" daemon [_thread_blocked, id=4092, stack(0x0c0f0000,0x0c140000)] 0x0b6e8400 JavaThread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2" daemon [_thread_blocked, id=2936, stack(0x0c0a0000,0x0c0f0000)] 0x0b375800 JavaThread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1" daemon [_thread_blocked, id=3556, stack(0x0c050000,0x0c0a0000)] 0x0b375400 JavaThread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0" daemon [_thread_blocked, id=2120, stack(0x0c000000,0x0c050000)] 0x0b1f4400 JavaThread "Timer-0" daemon [_thread_blocked, id=472, stack(0x0bfb0000,0x0c000000)] 0x0b157800 JavaThread "http-8080-1" daemon [_thread_in_native, id=3480, stack(0x0bf60000,0x0bfb0000)] 0x0b161c00 JavaThread "TP-Monitor" daemon [_thread_blocked, id=1756, stack(0x0bf10000,0x0bf60000)] 0x0b6c3800 JavaThread "TP-Processor4" daemon [_thread_in_native, id=2100, stack(0x0bec0000,0x0bf10000)] 0x0b16c400 JavaThread "TP-Processor3" daemon [_thread_blocked, id=1552, stack(0x0be70000,0x0bec0000)] 0x0b17a000 JavaThread "TP-Processor2" daemon [_thread_blocked, id=2064, stack(0x0be20000,0x0be70000)] 0x0b165400 JavaThread "TP-Processor1" daemon [_thread_blocked, id=1316, stack(0x0bdd0000,0x0be20000)] 0x0b191400 JavaThread "http-8080-Acceptor-0" daemon [_thread_in_native, id=2584, stack(0x0bd80000,0x0bdd0000)] 0x0b1aec00 JavaThread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon [_thread_blocked, id=3560, stack(0x0bd30000,0x0bd80000)] 0x0ab2f000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3496, stack(0x0ae70000,0x0aec0000)] 0x0ab20800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3432, stack(0x0ae20000,0x0ae70000)] 0x0ab1d800 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=1884, stack(0x0add0000,0x0ae20000)] 0x0ab1bc00 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=2956, stack(0x0ad80000,0x0add0000)] 0x0ab19800 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=2572, stack(0x0ad30000,0x0ad80000)] 0x0ab0a400 JavaThread "Attach Listener" daemon [_thread_blocked, id=2528, stack(0x0acc0000,0x0ad10000)] 0x0ab22800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=1740, stack(0x0ac70000,0x0acc0000)] 0x0aaf8400 JavaThread "Finalizer" daemon [_thread_blocked, id=2692, stack(0x0ac20000,0x0ac70000)] 0x0aaf3800 JavaThread "Reference Handler" daemon [_thread_blocked, id=2268, stack(0x0abd0000,0x0ac20000)] 0x00847000 JavaThread "main" [_thread_in_native, id=264, stack(0x008e0000,0x00930000)] Other Threads: 0x0aaf0800 VMThread [stack: 0x0ab80000,0x0abd0000] [id=3036] 0x0ab42c00 WatcherThread [stack: 0x0aec0000,0x0af10000] [id=2456] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 2560K, used 1364K [0x029e0000, 0x02ca0000, 0x02ec0000) eden space 2304K, 48% used [0x029e0000, 0x02af5110, 0x02c20000) from space 256K, 100% used [0x02c60000, 0x02ca0000, 0x02ca0000) to space 256K, 0% used [0x02c20000, 0x02c20000, 0x02c60000) tenured generation total 33628K, used 25061K [0x02ec0000, 0x04f97000, 0x069e0000) the space 33628K, 74% used [0x02ec0000, 0x047397f8, 0x04739800, 0x04f97000) compacting perm gen total 28416K, used 28380K [0x069e0000, 0x085a0000, 0x0a9e0000) the space 28416K, 99% used [0x069e0000, 0x08597098, 0x08597200, 0x085a0000) No shared spaces configured. Dynamic libraries: 0x00400000 - 0x00424000 D:\JAVA\jre6\bin\javaw.exe 0x7c920000 - 0x7c9b3000 C:\WINDOWS\system32\ntdll.dll 0x7c800000 - 0x7c91e000 C:\WINDOWS\system32\kernel32.dll 0x77da0000 - 0x77e49000 C:\WINDOWS\system32\ADVAPI32.dll 0x77e50000 - 0x77ee2000 C:\WINDOWS\system32\RPCRT4.dll 0x77fc0000 - 0x77fd1000 C:\WINDOWS\system32\Secur32.dll 0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll 0x77ef0000 - 0x77f39000 C:\WINDOWS\system32\GDI32.dll 0x76300000 - 0x7631d000 C:\WINDOWS\system32\IMM32.DLL 0x62c20000 - 0x62c29000 C:\WINDOWS\system32\LPK.DLL 0x73fa0000 - 0x7400b000 C:\WINDOWS\system32\USP10.dll 0x7c340000 - 0x7c396000 D:\JAVA\jre6\bin\msvcr71.dll 0x6d800000 - 0x6da8b000 D:\JAVA\jre6\bin\client\jvm.dll 0x76b10000 - 0x76b3a000 C:\WINDOWS\system32\WINMM.dll 0x6d7b0000 - 0x6d7bc000 D:\JAVA\jre6\bin\verify.dll 0x6d330000 - 0x6d34f000 D:\JAVA\jre6\bin\java.dll 0x6d290000 - 0x6d298000 D:\JAVA\jre6\bin\hpi.dll 0x76bc0000 - 0x76bcb000 C:\WINDOWS\system32\PSAPI.DLL 0x6d380000 - 0x6d3a9000 D:\JAVA\jre6\bin\jdwp.dll 0x6d6a0000 - 0x6d6a6000 D:\JAVA\jre6\bin\npt.dll 0x6d7f0000 - 0x6d7ff000 D:\JAVA\jre6\bin\zip.dll 0x6d200000 - 0x6d207000 D:\JAVA\jre6\bin\dt_socket.dll 0x71a20000 - 0x71a37000 C:\WINDOWS\system32\WS2_32.dll 0x77be0000 - 0x77c38000 C:\WINDOWS\system32\msvcrt.dll 0x71a10000 - 0x71a18000 C:\WINDOWS\system32\WS2HELP.dll 0x719c0000 - 0x719fe000 C:\WINDOWS\System32\mswsock.dll 0x76ef0000 - 0x76f17000 C:\WINDOWS\system32\DNSAPI.dll 0x76f80000 - 0x76f88000 C:\WINDOWS\System32\winrnr.dll 0x76f30000 - 0x76f5c000 C:\WINDOWS\system32\WLDAP32.dll 0x76f90000 - 0x76f96000 C:\WINDOWS\system32\rasadhlp.dll 0x60fd0000 - 0x61025000 C:\WINDOWS\system32\hnetcfg.dll 0x71a00000 - 0x71a08000 C:\WINDOWS\System32\wshtcpip.dll 0x6d610000 - 0x6d623000 D:\JAVA\jre6\bin\net.dll 0x68000000 - 0x68036000 C:\WINDOWS\system32\rsaenh.dll 0x759d0000 - 0x75a7f000 C:\WINDOWS\system32\USERENV.dll 0x5fdd0000 - 0x5fe25000 C:\WINDOWS\system32\netapi32.dll 0x6d560000 - 0x6d569000 D:\JAVA\jre6\bin\management.dll VM Arguments: jvm_args: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:3259 -Dcatalina.home=E:\Program Files\Genuitec\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_7.0.0.zmyeclipse70020081206\tomcat -Dcatalina.base=E:\hrpa\.metadata\.me_tcat -Djava.endorsed.dirs=E:\Program Files\Genuitec\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_7.0.0.zmyeclipse70020081206\tomcat/common/endorsed -Djava.io.tmpdir=E:\hrpa\.metadata\.me_tcat\temp -Djava.library.path=D:\JAVA\jre6\bin;E:\Program Files\Genuitec\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_7.0.0.zmyeclipse70020081206\tomcat\bin -Dsun.io.useCanonCaches=false java_command: org.apache.catalina.startup.Bootstrap start Launcher Type: SUN_STANDARD Environment Variables: JAVA_HOME=D:\JAVA CLASSPATH=.;D:\JAVA\lib\tools.jar;D:\JAVA\lib\dt.jar; PATH=e:/Program Files/Genuitec/Common/binary/com.sun.java.jre.win32.x86_1.5.0.011/bin/client;e:/Program Files/Genuitec/Common/binary/com.sun.java.jre.win32.x86_1.5.0.011/bin;;D:\JAVA\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Thunder Network\KanKan\Codecs;C:\Program Files\Gemplus\GemSafe Libraries\BIN\;D:\Program Files\IDM Computer Solutions\UltraEdit-32;C:\PROGRA~1\StormII\Codec;C:\PROGRA~1\StormII USERNAME=Edwin OS=Windows_NT PROCESSOR_IDENTIFIER=x86 Family 15 Model 6 Stepping 5, GenuineIntel --------------- S Y S T E M --------------- OS: Windows XP Build 2600 Service Pack 3 CPU:total 1 (1 cores per cpu, 1 threads per core) family 15 model 6 stepping 5, cmov, cx8, fxsr, mmx, sse, sse2, sse3 Memory: 4k page, physical 2088432k(638876k free), swap 4194303k(4194303k free) vm_info: Java HotSpot(TM) Client VM (14.3-b01) for windows-x86 JRE (1.6.0_17-b04), built on Oct 11 2009 00:52:06 by "java_re" with MS VC++ 7.1 time: Mon Apr 19 17:06:13 2010 elapsed time: 346 seconds
各位大佬,请问一下:VC++6.0编译时没错误,但是运行不了是因为什么啊,都是照着书编的!
BOOL CRentDlg::OnInitDialog() { CDialog::OnInitDialog(); // Add "About..." menu item to system menu. // IDM_ABOUTBOX must be in the system command range. ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); ASSERT(IDM_ABOUTBOX < 0xF000); CMenu* pSysMenu = GetSystemMenu(FALSE); if (pSysMenu != NULL) { CString strAboutMenu; strAboutMenu.LoadString(IDS_ABOUTBOX); if (!strAboutMenu.IsEmpty()) { pSysMenu->AppendMenu(MF_SEPARATOR); pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); } } // Set the icon for this dialog. The framework does this automatically // when the application's main window is not a dialog SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); // Set small icon // TODO: Add extra initialization here //初始化List控件的栏目名,设置List控件每列的标题、宽度 m_rentInfoList.InsertColumn(0,"ID",LVCFMT_LEFT,40,-1); m_rentInfoList.InsertColumn(1,"租借人",LVCFMT_LEFT,160,-1); m_rentInfoList.InsertColumn(2,"租借DVD名",LVCFMT_LEFT,200,-1); m_rentInfoList.InsertColumn(3,"租借日期",LVCFMT_LEFT,160,-1); //设置List的行被选中时是全行选中 m_rentInfoList.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES); //设置Date Time Picker控件的日期格式 m_DateFrom.SetFormat("yyyyMMdd"); m_DateTo.SetFormat("yyyyMMdd"); //日期查询初始化时是不选中的,设置起始日期的控件不可用 m_check_Date=FALSE; m_DateFrom.EnableWindow(FALSE); m_DateTo.EnableWindow(FALSE); //初始化数据库连接 HRESULT hr; try { //实例化连接对象 hr=m_pConnection.CreateInstance(__uuidof(Connection)); if(SUCCEEDED(hr)) { //设置连接串属性为UDL文件 m_pConnection->ConnectionString="File Name=my_data1.udl"; //设置等待连接打开的时间为20秒 m_pConnection->ConnectionTimeout=20; hr=m_pConnection->Open ("","","",NULL); if(FAILED(hr)) { AfxMessageBox("open fail!"); return TRUE; } } else { AfxMessageBox("createinstance of Connection fail!"); return TRUE; } } catch(_com_error e) {//给出异常信息 _bstr_t bstrSource(e.Source ()); _bstr_t bstrDescription(e.Description()); AfxMessageBox(bstrSource+bstrDescription); return TRUE; } //获得本月的出租记录,并显示在List控件中 InitListCtr(); return TRUE; // return TRUE unless you set the focus to a control } void CRentDlg::OnCheckDate() { // TODO: Add your control notification handler code here if(m_check_Date==FALSE) { m_check_Date=TRUE; m_DateFrom.EnableWindow(TRUE); m_DateTo.EnableWindow(TRUE); } else { m_check_Date=FALSE; m_DateFrom.EnableWindow(FALSE); m_DateTo.EnableWindow(FALSE); } } void CRentDlg::InitListCtr() { HRESULT hr; //定义记录集指针 _RecordsetPtr pRentRecordset; //实例化记录集指针 hr=pRentRecordset.CreateInstance(__uuidof(Recordset)); //判断创建记录集指针实例是否成功 if(FAILED(hr)) { AfxMessageBox("createinstance of Recordset fail!\n can't initiate List control!"); return; } //定义字符串存储SQL语句 CString strSql; //定义_variant_t变量存储从数据库读取到的字段 _variant_t var; //定义字符串存储_varient_t变量中的字符串 CString strValue; //List控件中记录的序号 int curItem=0; //初始化SQL语句字符串,获得tbRentInfo表中的 strSql="SELECT * FROM tbRentInfo"; try {//利用Open函数执行SQL命令,获得查询结果记录集 //需要把CString类型转化为_varient_t类型 hr=pRentRecordset->Open (_variant_t(strSql), m_pConnection.GetInterfacePtr(), adOpenDynamic, adLockOptimistic, adCmdText); if(SUCCEEDED(hr)) {//判断记录集是否到末尾,对每条记录,把字段插入List控件的每一行中 while(!pRentRecordset->adoEOF) {//获得记录集中但前记录的第一个字段的值 var = pRentRecordset->GetCollect((long)0); if(var.vt != VT_NULL) strValue = (LPCSTR)_bstr_t(var); //插入该字符串到List控件中 m_rentInfoList.InsertItem(curItem,strValue); //获得记录集中但前记录的"Name"字段的值 var = pRentRecordset->GetCollect("Name"); if(var.vt != VT_NULL); strValue = (LPCSTR)_bstr_t(var); m_rentInfoList.SetItemText(curItem,1,strValue); var = pRentRecordset->GetCollect("DVDID"); if(var.vt != VT_NULL); strValue = (LPCSTR)_bstr_t(var); //需要根据该DVDID查询tbDVDInfo,获得DVDname,插入List控件中 m_rentInfoList.SetItemText(curItem,2,QueryDVDName(strValue)); var = pRentRecordset->GetCollect("Date"); if(var.vt != VT_NULL); strValue = (LPCSTR)_bstr_t(var); m_rentInfoList.SetItemText(curItem,3,strValue); //移动当前记录到下一条记录 pRentRecordset->MoveNext(); curItem++; } } else { AfxMessageBox("Open recordset fail!"); } } catch(_com_error *e) { AfxMessageBox( e->ErrorMessage()); return; } pRentRecordset->Close(); pRentRecordset=NULL; } CString CRentDlg::QueryDVDName(CString DVDID) { _RecordsetPtr pDVDNameRecordset; pDVDNameRecordset.CreateInstance(__uuidof(Recordset)); CString strValue; _variant_t var; //直接使用_bstr_t类型的字符串 _bstr_t vSQL; //选择参数指定的DVDID的记录 vSQL="select DVDNme from tbDVDInfo where DVDID="+DVDID; try {//vSQL可以直接作为参数传给Open函数,而如果使用CStrig类型需要类型转换 HRESULT hr; //利用SQL语句打开记录集 hr=pDVDNameRecordset->Open(vSQL, m_pConnection.GetInterfacePtr(), adOpenDynamic, adLockOptimistic, adCmdText); if(!FAILED(hr)) { var=pDVDNameRecordset->GetCollect("DVDName"); if(var.vt != VT_NULL); strValue = (LPCSTR)_bstr_t(var); } else strValue=""; } catch(_com_error *e) { AfxMessageBox(e->ErrorMessage()); strValue=""; } pDVDNameRecordset->Close(); pDVDNameRecordset=NULL; return strValue; } 这些是我加的除了添加成员函数和成员变量以外的程序,应该怎么改啊
x64”的 Designtime 生成失败。IntelliSense 可能不可
今天我重装了系统,vs2019和cuda10.2 vcxproj里所有的v10.1全改成了v10.2 程序能编译,执行到第一个cuda runtime app"cudaGetDeviceCount(&deviceCount);"时,出现错误: 0x00007FFDEAFCA859 处(位于 DualSPHysics4.4_win64_debug.exe 中)引发的异常: Microsoft C++ 异常: std::basic_string<char,std::char_traits<char>,std::allocator<char> >,位于内存位置 0x00000066B89CC608 处。 ``` <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="DebugCPU|x64"> <Configuration>DebugCPU</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="ReleaseCPU|x64"> <Configuration>ReleaseCPU</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|x64"> <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{55F71337-32A6-4C26-8CBA-A06A9183D6F2}</ProjectGuid> <RootNamespace>DualSPHysics</RootNamespace> <Keyword>Win32Proj</Keyword> <ProjectName>DualSPHysics</ProjectName> <CudaToolkitCustomDir>$(CUDA_PATH_V10_2)</CudaToolkitCustomDir> <WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseOfMfc>false</UseOfMfc> <CharacterSet>MultiByte</CharacterSet> <WholeProgramOptimization>true</WholeProgramOptimization> <PlatformToolset>v142</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseOfMfc>false</UseOfMfc> <CharacterSet>MultiByte</CharacterSet> <WholeProgramOptimization>false</WholeProgramOptimization> <PlatformToolset>v142</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseOfMfc>false</UseOfMfc> <CharacterSet>MultiByte</CharacterSet> <WholeProgramOptimization>true</WholeProgramOptimization> <PlatformToolset>v142</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseOfMfc>false</UseOfMfc> <CharacterSet>Unicode</CharacterSet> <WholeProgramOptimization>false</WholeProgramOptimization> <PlatformToolset>v142</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> <Import Project="$(VCTargetsPath)\BuildCustomizations\CUDA 10.2.props" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup> <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../../bin/windows/</OutDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Intermediate/$(ProjectName)_$(Configuration)_$(PlatformName)/</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Intermediate/$(ProjectName)_$(Configuration)_$(PlatformName)/</IntDir> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> </LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">../../bin/windows/</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">../../bin/windows/</OutDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">Intermediate/$(ProjectName)_$(Configuration)_$(PlatformName)/</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">Intermediate/$(ProjectName)_$(Configuration)_$(PlatformName)/</IntDir> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'"> </LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'" /> <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'" /> <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'" /> <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'" /> <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'" /> <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectName)4.4_win64</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectName)4.4_win64_debug</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">$(ProjectName)4.4CPU_win64</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">$(ProjectName)4.4CPU_win64_debug</TargetName> <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</PreBuildEventUseInBuild> <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</PreBuildEventUseInBuild> <PreLinkEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</PreLinkEventUseInBuild> <PreLinkEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreLinkEventUseInBuild> <PostBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</PostBuildEventUseInBuild> <PostBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</PostBuildEventUseInBuild> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <OutDir>../../bin/windows/</OutDir> <EmbedManifest>true</EmbedManifest> <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(CUDA_PATH)\include</IncludePath> <LibraryPath>$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(CUDA_PATH)\lib\x64</LibraryPath> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PreBuildEvent> <Command> </Command> </PreBuildEvent> <ClCompile> <Optimization>MaxSpeed</Optimization> <InlineFunctionExpansion> </InlineFunctionExpansion> <IntrinsicFunctions> </IntrinsicFunctions> <FavorSizeOrSpeed> </FavorSizeOrSpeed> <OmitFramePointers> </OmitFramePointers> <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> <WholeProgramOptimization>true</WholeProgramOptimization> <AdditionalIncludeDirectories>$(CUDA_PATH_V10_2)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>_WITHGPU;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <PrecompiledHeader>NotUsing</PrecompiledHeader> <GenerateXMLDocumentationFiles>false</GenerateXMLDocumentationFiles> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <MultiProcessorCompilation>true</MultiProcessorCompilation> <OpenMPSupport>true</OpenMPSupport> <RuntimeTypeInfo> </RuntimeTypeInfo> <CompileAs>CompileAsCpp</CompileAs> </ClCompile> <Link> <AdditionalDependencies>cudart_static.lib;dsphchrono.lib;JWaveGen_$(PlatformName)_$(PlatformToolset)_$(Configuration).lib;JFormatFiles2_$(PlatformName)_$(PlatformToolset)_$(Configuration).lib;JWave_MLP_RZ_$(PlatformName)_$(PlatformToolset)_$(Configuration).lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(TargetPath)</OutputFile> <AdditionalLibraryDirectories>$(CUDA_PATH_V10_2)/lib/$(PlatformName);../lib/vs2015;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <GenerateDebugInformation>false</GenerateDebugInformation> <SubSystem>Console</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>false</EnableCOMDATFolding> <IgnoreAllDefaultLibraries> </IgnoreAllDefaultLibraries> <LinkStatus> </LinkStatus> </Link> <PostBuildEvent> <Command>IF EXIST cg_variables.h move cg_variables.h $(Configuration)\ </Command> </PostBuildEvent> <CudaCompile> <TargetMachinePlatform>64</TargetMachinePlatform> <Defines> </Defines> <UseHostInclude>false</UseHostInclude> <AdditionalOptions>-use_fast_math -Xcompiler "/wd 4267" %(AdditionalOptions)</AdditionalOptions> <CodeGeneration>compute_30,sm_30;compute_35,sm_35;compute_50,sm_50;compute_52,sm_52;compute_61,sm_61;compute_70,sm_70</CodeGeneration> </CudaCompile> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PreBuildEvent> <Command> </Command> </PreBuildEvent> <ClCompile> <Optimization>Disabled</Optimization> <InlineFunctionExpansion> </InlineFunctionExpansion> <IntrinsicFunctions>false</IntrinsicFunctions> <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> <OmitFramePointers> </OmitFramePointers> <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> <WholeProgramOptimization>false</WholeProgramOptimization> <AdditionalIncludeDirectories>$(CUDA_PATH_V10_2)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>_WITHGPU;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <PrecompiledHeader>NotUsing</PrecompiledHeader> <GenerateXMLDocumentationFiles>false</GenerateXMLDocumentationFiles> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <MultiProcessorCompilation> </MultiProcessorCompilation> <OpenMPSupport>true</OpenMPSupport> <RuntimeTypeInfo> </RuntimeTypeInfo> <CompileAs>CompileAsCpp</CompileAs> <MinimalRebuild>true</MinimalRebuild> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> </ClCompile> <Link> <AdditionalDependencies>cudart_static.lib;dsphchrono.lib;JWaveGen_$(PlatformName)_$(PlatformToolset)_$(Configuration).lib;JFormatFiles2_$(PlatformName)_$(PlatformToolset)_$(Configuration).lib;JWave_MLP_RZ_$(PlatformName)_$(PlatformToolset)_$(Configuration).lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(TargetPath)</OutputFile> <AdditionalLibraryDirectories>$(CUDA_PATH_V10_2)/lib/$(PlatformName);../lib/vs2015;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> <OptimizeReferences> </OptimizeReferences> <EnableCOMDATFolding> </EnableCOMDATFolding> <IgnoreAllDefaultLibraries> </IgnoreAllDefaultLibraries> <LinkStatus> </LinkStatus> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> </Link> <PostBuildEvent> <Command>IF EXIST cg_variables.h move cg_variables.h $(Configuration)\ </Command> </PostBuildEvent> <CudaCompile> <TargetMachinePlatform>64</TargetMachinePlatform> <Defines> </Defines> <UseHostInclude>false</UseHostInclude> <AdditionalOptions>-use_fast_math -Xcompiler "/wd 4267" %(AdditionalOptions)</AdditionalOptions> <CodeGeneration>compute_30,sm_30;compute_35,sm_35;compute_50,sm_50;compute_52,sm_52;compute_61,sm_61;compute_70,sm_70</CodeGeneration> </CudaCompile> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'"> <PreBuildEvent> <Command> </Command> </PreBuildEvent> <ClCompile> <Optimization>MaxSpeed</Optimization> <InlineFunctionExpansion> </InlineFunctionExpansion> <IntrinsicFunctions> </IntrinsicFunctions> <FavorSizeOrSpeed> </FavorSizeOrSpeed> <OmitFramePointers> </OmitFramePointers> <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> <WholeProgramOptimization>true</WholeProgramOptimization> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <OpenMPSupport>true</OpenMPSupport> <PrecompiledHeader>NotUsing</PrecompiledHeader> <GenerateXMLDocumentationFiles>false</GenerateXMLDocumentationFiles> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <MultiProcessorCompilation>true</MultiProcessorCompilation> <RuntimeTypeInfo> </RuntimeTypeInfo> <CompileAs>CompileAsCpp</CompileAs> </ClCompile> <Link> <OutputFile>$(TargetPath)</OutputFile> <AdditionalLibraryDirectories>../lib/vs2015;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <GenerateDebugInformation>false</GenerateDebugInformation> <SubSystem>Console</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>false</EnableCOMDATFolding> <AdditionalDependencies>dsphchrono.lib;JWaveGen_$(PlatformName)_$(PlatformToolset)_Release.lib;JFormatFiles2_$(PlatformName)_$(PlatformToolset)_Release.lib;JWave_MLP_RZ_$(PlatformName)_$(PlatformToolset)_Release.lib;%(AdditionalDependencies)</AdditionalDependencies> <LinkStatus> </LinkStatus> </Link> <PostBuildEvent> <Command>IF EXIST cg_variables.h move cg_variables.h $(Configuration)\</Command> </PostBuildEvent> <CudaCompile> <CodeGeneration>compute_30,sm_30</CodeGeneration> </CudaCompile> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'"> <PreBuildEvent> <Command> </Command> </PreBuildEvent> <ClCompile> <Optimization>Disabled</Optimization> <InlineFunctionExpansion> </InlineFunctionExpansion> <IntrinsicFunctions>false</IntrinsicFunctions> <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> <OmitFramePointers> </OmitFramePointers> <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> <WholeProgramOptimization>false</WholeProgramOptimization> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <OpenMPSupport>true</OpenMPSupport> <PrecompiledHeader>NotUsing</PrecompiledHeader> <GenerateXMLDocumentationFiles>false</GenerateXMLDocumentationFiles> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <MultiProcessorCompilation> </MultiProcessorCompilation> <RuntimeTypeInfo> </RuntimeTypeInfo> <CompileAs>CompileAsCpp</CompileAs> <MinimalRebuild>true</MinimalRebuild> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> </ClCompile> <Link> <OutputFile>$(TargetPath)</OutputFile> <AdditionalLibraryDirectories>../lib/vs2015;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> <OptimizeReferences> </OptimizeReferences> <EnableCOMDATFolding> </EnableCOMDATFolding> <AdditionalDependencies>dsphchrono.lib;JWaveGen_$(PlatformName)_$(PlatformToolset)_Debug.lib;JFormatFiles2_$(PlatformName)_$(PlatformToolset)_Debug.lib;JWave_MLP_RZ_$(PlatformName)_$(PlatformToolset)_Debug.lib;%(AdditionalDependencies)</AdditionalDependencies> <LinkStatus> </LinkStatus> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> </Link> <PostBuildEvent> <Command>IF EXIST cg_variables.h move cg_variables.h $(Configuration)\</Command> </PostBuildEvent> <CudaCompile> <CodeGeneration>compute_30,sm_30</CodeGeneration> </CudaCompile> </ItemDefinitionGroup> <ItemGroup> <CudaCompile Include="..\source\FunctionsMath_ker.cu"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> </CudaCompile> <CudaCompile Include="..\source\JCellDivGpu_ker.cu"> <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">rem ***Vars de compilacion set CudaPath=$(CUDA_PATH_V10_2) set CudaNvcc="%CudaPath%\bin\nvcc.exe" set CudaInc="%CudaPath%\include" rem ***Seleccion de GPU hardware para compilacion set gpuhw=-gencode=arch=compute_30,code=\"sm_30,compute_30\" set gpuhw=-gencode=arch=compute_35,code=\"sm_35,compute_35\" set gpuhw=-gencode=arch=compute_13,code=\"sm_13,compute_13\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" set gpuhw=-gencode=arch=compute_20,code=\"sm_20,compute_20\" rem ***Activa la visualizacion de registros por kernel set ptxinfo=--ptxas-options -v set ptxinfo= rem ***Sentencia de compilacion %CudaNvcc% -ccbin "$(VCInstallDir)bin" %gpuhw% -use_fast_math -c %ptxinfo% -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/O2,/Zi,/MT -m 64 -I%CudaInc% -I./ -o Intermediate\$(Configuration)\%(Filename).obj ..\%(Filename)%(Extension) </Command> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">rem ***Vars de compilacion set CudaPath=$(CUDA_PATH_V10_2) set CudaNvcc="%CudaPath%\bin\nvcc.exe" set CudaInc="%CudaPath%\include" rem ***Seleccion de GPU hardware para compilacion set gpuhw=-gencode=arch=compute_30,code=\"sm_30,compute_30\" set gpuhw=-gencode=arch=compute_35,code=\"sm_35,compute_35\" set gpuhw=-gencode=arch=compute_13,code=\"sm_13,compute_13\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" set gpuhw=-gencode=arch=compute_20,code=\"sm_20,compute_20\" rem ***Activa la visualizacion de registros por kernel set ptxinfo=--ptxas-options -v set ptxinfo= rem ***Sentencia de compilacion %CudaNvcc% -ccbin "$(VCInstallDir)bin" %gpuhw% -use_fast_math -c %ptxinfo% -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/O2,/Zi,/MT -m 64 -I%CudaInc% -I./ -o Intermediate\$(Configuration)\%(Filename).obj ..\%(Filename)%(Extension) </Command> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Intermediate\$(Configuration)\%(Filename).obj</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Intermediate\$(Configuration)\%(Filename).obj</Outputs> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> <FileType>Document</FileType> </CudaCompile> <CudaCompile Include="..\source\JCellDivGpuSingle_ker.cu"> <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">rem ***Vars de compilacion set CudaPath=$(CUDA_PATH_V10_2) set CudaNvcc="%CudaPath%\bin\nvcc.exe" set CudaInc="%CudaPath%\include" rem ***Seleccion de GPU hardware para compilacion set gpuhw=-gencode=arch=compute_30,code=\"sm_30,compute_30\" set gpuhw=-gencode=arch=compute_13,code=\"sm_13,compute_13\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" set gpuhw=-gencode=arch=compute_35,code=\"sm_35,compute_35\" set gpuhw=-gencode=arch=compute_13,code=\"sm_13,compute_13\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" set gpuhw=-gencode=arch=compute_20,code=\"sm_20,compute_20\" rem ***Activa la visualizacion de registros por kernel set ptxinfo=--ptxas-options -v set ptxinfo= rem ***Sentencia de compilacion %CudaNvcc% -ccbin "$(VCInstallDir)bin" %gpuhw% -use_fast_math -c %ptxinfo% -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/O2,/Zi,/MT -m 64 -I%CudaInc% -I./ -o Intermediate\$(Configuration)\%(Filename).obj ..\%(Filename)%(Extension) </Command> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">rem ***Vars de compilacion set CudaPath=$(CUDA_PATH_V10_2) set CudaNvcc="%CudaPath%\bin\nvcc.exe" set CudaInc="%CudaPath%\include" rem ***Seleccion de GPU hardware para compilacion set gpuhw=-gencode=arch=compute_30,code=\"sm_30,compute_30\" set gpuhw=-gencode=arch=compute_13,code=\"sm_13,compute_13\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" set gpuhw=-gencode=arch=compute_35,code=\"sm_35,compute_35\" set gpuhw=-gencode=arch=compute_13,code=\"sm_13,compute_13\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" set gpuhw=-gencode=arch=compute_20,code=\"sm_20,compute_20\" rem ***Activa la visualizacion de registros por kernel set ptxinfo=--ptxas-options -v set ptxinfo= rem ***Sentencia de compilacion %CudaNvcc% -ccbin "$(VCInstallDir)bin" %gpuhw% -use_fast_math -c %ptxinfo% -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/O2,/Zi,/MT -m 64 -I%CudaInc% -I./ -o Intermediate\$(Configuration)\%(Filename).obj ..\%(Filename)%(Extension) </Command> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Intermediate\$(Configuration)\%(Filename).obj</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Intermediate\$(Configuration)\%(Filename).obj</Outputs> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> <FileType>Document</FileType> </CudaCompile> <CudaCompile Include="..\source\JGauge_ker.cu"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </CudaCompile> <CudaCompile Include="..\source\JReduSum_ker.cu"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </CudaCompile> <CudaCompile Include="..\source\JRelaxZone_ker.cu"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </CudaCompile> <CudaCompile Include="..\source\JSphGpu_InOut_ker.cu"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> </CudaCompile> <CudaCompile Include="..\source\JSphGpu_ker.cu"> <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">rem ***Vars de compilacion set CudaPath=$(CUDA_PATH_V10_2) set CudaNvcc="%CudaPath%\bin\nvcc.exe" set CudaInc="%CudaPath%\include" rem ***Seleccion de GPU hardware para compilacion set gpuhw=-gencode=arch=compute_30,code=\"sm_30,compute_30\" set gpuhw=-gencode=arch=compute_13,code=\"sm_13,compute_13\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" set gpuhw=-gencode=arch=compute_35,code=\"sm_35,compute_35\" set gpuhw=-gencode=arch=compute_13,code=\"sm_13,compute_13\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" set gpuhw=-gencode=arch=compute_20,code=\"sm_20,compute_20\" rem ***Activa la visualizacion de registros por kernel y creacion de _ptxasinfo set ptxinfo=--ptxas-options -v set ptxinfo= rem ***Sentencia de compilacion sin salida _ptxasinfo %CudaNvcc% -ccbin "$(VCInstallDir)bin" %gpuhw% -use_fast_math -c %ptxinfo% -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/O2,/Zi,/MT -m 64 -I%CudaInc% -I./ -o Intermediate\$(Configuration)\%(Filename).obj ..\%(Filename)%(Extension) -D _CRT_SECURE_NO_DEPRECATE rem ***Sentencia de compilacion con salida _ptxasinfo rem %CudaNvcc% -ccbin "$(VCInstallDir)bin" %gpuhw% -use_fast_math -c %ptxinfo% -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/O2,/Zi,/MT -m 64 -I%CudaInc% -I./ -o Intermediate\$(Configuration)\%(Filename).obj ..\%(Filename)%(Extension) -D _CRT_SECURE_NO_DEPRECATE 1&gt;$(OutDir)$(ProjectName)_$(Configuration)64_ptxasinfo </Command> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">rem ***Vars de compilacion set CudaPath=$(CUDA_PATH_V10_2) set CudaNvcc="%CudaPath%\bin\nvcc.exe" set CudaInc="%CudaPath%\include" rem ***Seleccion de GPU hardware para compilacion set gpuhw=-gencode=arch=compute_30,code=\"sm_30,compute_30\" set gpuhw=-gencode=arch=compute_13,code=\"sm_13,compute_13\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" set gpuhw=-gencode=arch=compute_35,code=\"sm_35,compute_35\" set gpuhw=-gencode=arch=compute_13,code=\"sm_13,compute_13\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" set gpuhw=-gencode=arch=compute_20,code=\"sm_20,compute_20\" rem ***Activa la visualizacion de registros por kernel y creacion de _ptxasinfo set ptxinfo=--ptxas-options -v set ptxinfo= rem ***Sentencia de compilacion sin salida _ptxasinfo %CudaNvcc% -ccbin "$(VCInstallDir)bin" %gpuhw% -use_fast_math -c %ptxinfo% -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/O2,/Zi,/MT -m 64 -I%CudaInc% -I./ -o Intermediate\$(Configuration)\%(Filename).obj ..\%(Filename)%(Extension) -D _CRT_SECURE_NO_DEPRECATE rem ***Sentencia de compilacion con salida _ptxasinfo rem %CudaNvcc% -ccbin "$(VCInstallDir)bin" %gpuhw% -use_fast_math -c %ptxinfo% -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/O2,/Zi,/MT -m 64 -I%CudaInc% -I./ -o Intermediate\$(Configuration)\%(Filename).obj ..\%(Filename)%(Extension) -D _CRT_SECURE_NO_DEPRECATE 1&gt;$(OutDir)$(ProjectName)_$(Configuration)64_ptxasinfo </Command> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Intermediate\$(Configuration)\%(Filename).obj</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Intermediate\$(Configuration)\%(Filename).obj</Outputs> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> </AdditionalInputs> <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> </AdditionalInputs> <FileType>Document</FileType> </CudaCompile> <CudaCompile Include="..\source\JWaveOrder2_ker.cu"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </CudaCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\source\DSPHChronoLib.h" /> <ClInclude Include="..\source\Functions.h" /> <ClInclude Include="..\source\FunctionsCuda.h"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </ClInclude> <ClInclude Include="..\source\FunctionsGeo3d.h" /> <ClInclude Include="..\source\FunctionsMath.h" /> <ClInclude Include="..\source\JAppInfo.h" /> <ClInclude Include="..\source\JArraysCpu.h" /> <ClInclude Include="..\source\JBinaryData.h" /> <ClInclude Include="..\source\JBlockSizeAuto.h"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </ClInclude> <ClInclude Include="..\source\JCellDivCpu.h" /> <ClInclude Include="..\source\JCellDivCpuSingle.h" /> <ClInclude Include="..\source\JCellDivGpu.h"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </ClInclude> <ClInclude Include="..\source\JCellDivGpuSingle.h"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </ClInclude> <ClInclude Include="..\source\JCellDivGpuSingle_ker.h"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </ClInclude> <ClInclude Include="..\source\JCellDivGpu_ker.h"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </ClInclude> <ClInclude Include="..\source\JChronoData.h" /> <ClInclude Include="..\source\JChronoObjects.h" /> <ClInclude Include="..\source\JDamping.h" /> <ClInclude Include="..\source\JDsphConfig.h" /> <ClInclude Include="..\source\JException.h" /> <ClInclude Include="..\source\JFormatFiles2.h" /> <ClInclude Include="..\source\JArraysGpu.h"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </ClInclude> <ClInclude Include="..\source\JGaugeItem.h" /> <ClInclude Include="..\source\JGaugeSystem.h" /> <ClInclude Include="..\source\JGauge_ker.h"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </ClInclude> <ClInclude Include="..\source\JLinearValue.h" /> <ClInclude Include="..\source\JLinearValueDef.h" /> <ClInclude Include="..\source\JLog2.h" /> <ClInclude Include="..\source\JMatrix4.h" /> <ClInclude Include="..\source\JMeanValues.h" /> <ClInclude Include="..\source\JMLPistons.h" /> <ClInclude Include="..\source\JMLPistonsGpu.h" /> <ClInclude Include="..\source\JMotion.h" /> <ClInclude Include="..\source\JMotionEvent.h" /> <ClInclude Include="..\source\JMotionList.h" /> <ClInclude Include="..\source\JMotionMov.h" /> <ClInclude Include="..\source\JMotionObj.h" /> <ClInclude Include="..\source\JMotionPos.h" /> <ClInclude Include="..\source\JObject.h" /> <ClInclude Include="..\source\JObjectGpu.h"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </ClInclude> <ClInclude Include="..\source\JPartDataBi4.h" /> <ClInclude Include="..\source\JPartDataHead.h" /> <ClInclude Include="..\source\JPartFloatBi4.h" /> <ClInclude Include="..\source\JParticlesDef.h" /> <ClInclude Include="..\source\JPartOutBi4Save.h" /> <ClInclude Include="..\source\JPartsLoad4.h" /> <ClInclude Include="..\source\JPeriodicDef.h" /> <ClInclude Include="..\source\JRadixSort.h" /> <ClInclude Include="..\source\JRangeFilter.h" /> <ClInclude Include="..\source\JReadDatafile.h" /> <ClInclude Include="..\source\JReduSum_ker.h"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </ClInclude> <ClInclude Include="..\source\JRelaxZones.h" /> <ClInclude Include="..\source\JRelaxZonesGpu.h" /> <ClInclude Include="..\source\JRelaxZone_ker.h"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </ClInclude> <ClInclude Include="..\source\JSaveCsv2.h" /> <ClInclude Include="..\source\JSaveDt.h" /> <ClInclude Include="..\source\JSimpleNeigs.h" /> <ClInclude Include="..\source\JSpaceProperties.h" /> <ClInclude Include="..\source\JSpaceVtkOut.h" /> <ClInclude Include="..\source\JSphAccInput.h" /> <ClInclude Include="..\source\JSphBoundCorr.h" /> <ClInclude Include="..\source\JSphDtFixed.h" /> <ClInclude Include="..\source\JSphGpuSingle.h"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </ClInclude> <ClInclude Include="..\source\JSphGpu_InOut_ker.h"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> </ClInclude> <ClInclude Include="..\source\JSphGpu_ker.h"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </ClInclude> <ClInclude Include="..\source\JSphInitialize.h" /> <ClInclude Include="..\source\JSphInOut.h" /> <ClInclude Include="..\source\JSphInOutGridData.h" /> <ClInclude Include="..\source\JSphInOutPoints.h" /> <ClInclude Include="..\source\JSphMk.h" /> <ClInclude Include="..\source\JSphMotion.h" /> <ClInclude Include="..\source\JSphPartsInit.h" /> <ClInclude Include="..\source\JSphVisco.h" /> <ClInclude Include="..\source\JPartsOut.h" /> <ClInclude Include="..\source\JSphCpuSingle.h" /> <ClInclude Include="..\source\JTimeControl.h" /> <ClInclude Include="..\source\JTimeOut.h" /> <ClInclude Include="..\source\JTimer.h" /> <ClInclude Include="..\source\JTimerCuda.h"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> </ClInclude> <ClInclude Include="..\source\JWaveGen.h" /> <ClInclude Include="..\source\JWaveOrder2_ker.h"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </ClInclude> <ClInclude Include="..\source\JWaveSpectrumGpu.h" /> <ClInclude Include="..\source\JXml.h" /> <ClInclude Include="..\source\OmpDefs.h" /> <ClInclude Include="..\source\randomc.h" /> <ClInclude Include="..\source\tinystr.h" /> <ClInclude Include="..\source\tinyxml.h" /> <ClInclude Include="..\source\Types.h" /> <ClInclude Include="..\source\TypesDef.h" /> <CustomBuildStep Include="..\source\_CudaSphApi.h"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> </CustomBuildStep> <CustomBuildStep Include="..\source\_radixsort.h"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> </CustomBuildStep> <ClInclude Include="..\source\JSphTimersCpu.h" /> <CustomBuildStep Include="..\source\JSphTimersGpu.h"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </CustomBuildStep> <ClInclude Include="..\source\JCfgRun.h" /> <ClInclude Include="..\source\JSpaceParts.h" /> <ClInclude Include="..\source\JSpaceCtes.h" /> <ClInclude Include="..\source\JSpaceEParms.h" /> <ClInclude Include="..\source\JSph.h" /> <ClInclude Include="..\source\JSphCpu.h" /> <CustomBuildStep Include="..\source\JSphGpu.h"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </CustomBuildStep> <ClInclude Include="..\source\JTimerClock.h" /> </ItemGroup> <ItemGroup> <ClCompile Include="..\source\Functions.cpp" /> <ClCompile Include="..\source\FunctionsCuda.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\source\FunctionsGeo3d.cpp" /> <ClCompile Include="..\source\JAppInfo.cpp" /> <ClCompile Include="..\source\JArraysCpu.cpp" /> <ClCompile Include="..\source\JBinaryData.cpp" /> <ClCompile Include="..\source\JBlockSizeAuto.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\source\JCellDivCpu.cpp" /> <ClCompile Include="..\source\JCellDivCpuSingle.cpp" /> <ClCompile Include="..\source\JCellDivGpu.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\source\JCellDivGpuSingle.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\source\JChronoObjects.cpp" /> <ClCompile Include="..\source\JDamping.cpp" /> <ClCompile Include="..\source\JArraysGpu.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\source\JDsphConfig.cpp" /> <ClCompile Include="..\source\JException.cpp" /> <ClCompile Include="..\source\JGaugeItem.cpp" /> <ClCompile Include="..\source\JGaugeSystem.cpp" /> <ClCompile Include="..\source\JLinearValue.cpp" /> <ClCompile Include="..\source\JLog2.cpp" /> <ClCompile Include="..\source\JMeanValues.cpp" /> <ClCompile Include="..\source\JMLPistonsGpu.cpp" /> <ClCompile Include="..\source\JMotion.cpp" /> <ClCompile Include="..\source\JMotionList.cpp" /> <ClCompile Include="..\source\JMotionMov.cpp" /> <ClCompile Include="..\source\JMotionObj.cpp" /> <ClCompile Include="..\source\JMotionPos.cpp" /> <ClCompile Include="..\source\JObject.cpp" /> <ClCompile Include="..\source\JObjectGpu.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\source\JPartDataBi4.cpp" /> <ClCompile Include="..\source\JPartDataHead.cpp" /> <ClCompile Include="..\source\JPartFloatBi4.cpp" /> <ClCompile Include="..\source\JPartOutBi4Save.cpp" /> <ClCompile Include="..\source\JPartsLoad4.cpp" /> <ClCompile Include="..\source\JRadixSort.cpp" /> <ClCompile Include="..\source\JRangeFilter.cpp" /> <ClCompile Include="..\source\JReadDatafile.cpp" /> <ClCompile Include="..\source\JRelaxZonesGpu.cpp" /> <ClCompile Include="..\source\JSaveCsv2.cpp" /> <ClCompile Include="..\source\JSaveDt.cpp" /> <ClCompile Include="..\source\JSimpleNeigs.cpp" /> <ClCompile Include="..\source\JSpaceProperties.cpp" /> <ClCompile Include="..\source\JSpaceVtkOut.cpp" /> <ClCompile Include="..\source\JSphAccInput.cpp" /> <ClCompile Include="..\source\JSphBoundCorr.cpp" /> <ClCompile Include="..\source\JSphCpuSingle_InOut.cpp" /> <ClCompile Include="..\source\JSphCpu_InOut.cpp" /> <ClCompile Include="..\source\JSphDtFixed.cpp" /> <ClCompile Include="..\source\JSphGpuSingle.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\source\JSphGpuSingle_InOut.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\source\JSphInitialize.cpp" /> <ClCompile Include="..\source\JSphInOut.cpp" /> <ClCompile Include="..\source\JSphInOutGridData.cpp" /> <ClCompile Include="..\source\JSphInOutPoints.cpp" /> <ClCompile Include="..\source\JSphMk.cpp" /> <ClCompile Include="..\source\JSphMotion.cpp" /> <ClCompile Include="..\source\JSphPartsInit.cpp" /> <ClCompile Include="..\source\JSphVisco.cpp" /> <ClCompile Include="..\source\JPartsOut.cpp" /> <ClCompile Include="..\source\JSphCpuSingle.cpp" /> <ClCompile Include="..\source\JTimeControl.cpp" /> <ClCompile Include="..\source\JTimeOut.cpp" /> <ClCompile Include="..\source\JCfgRun.cpp" /> <ClCompile Include="..\source\JSpaceParts.cpp" /> <ClCompile Include="..\source\JSpaceCtes.cpp" /> <ClCompile Include="..\source\JSpaceEParms.cpp" /> <ClCompile Include="..\source\JSph.cpp" /> <ClCompile Include="..\source\JSphCpu.cpp" /> <ClCompile Include="..\source\JSphGpu.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCPU|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugCPU|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\source\JWaveSpectrumGpu.cpp" /> <ClCompile Include="..\source\JXml.cpp" /> <ClCompile Include="..\source\main.cpp" /> <ClCompile Include="..\source\randomc.cpp" /> <ClCompile Include="..\source\tinystr.cpp" /> <ClCompile Include="..\source\tinyxml.cpp" /> <ClCompile Include="..\source\tinyxmlerror.cpp" /> <ClCompile Include="..\source\tinyxmlparser.cpp" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> <Import Project="$(VCTargetsPath)\BuildCustomizations\CUDA 10.2.targets" /> </ImportGroup> </Project>
c++ post提交数据中文乱码
vc6.0 mfc 客户端用post提交中文数据,在web服务端接收是乱码,初步分析是编码问题,如果将中文转换成utf-8发送,则服务端能正常接收中文。 测试时我是借用的浏览器将中文转换成utf-8的,然后用转换后的字符串直接提换中文。 比如: 一:PostHttpPage("0.citygo.duapp.com","orderfrom_new","clientName=中文"); 二:PostHttpPage("0.citygo.duapp.com","orderfrom_new","clientName=%E4%B8%AD%E6%96%87"); PostHttpPage函数借用其他人的,代码如下: bool PostHttpPage(const std::string& hostName, const std::string& pathName, const std::string& postData) { using namespace std; CInternetSession session("your"); try { INTERNET_PORT nPort = 80; DWORD dwRet = 0; CHttpConnection* pServer = session.GetHttpConnection(hostName.c_str(), nPort); CHttpFile* pFile = pServer->OpenRequest(CHttpConnection::HTTP_VERB_POST, pathName.c_str()); CString strHeaders = "Content-Type: application/x-www-form-urlencoded;charset=UTF-8"; // 请求头 //开始发送请求 pFile->SendRequest(strHeaders,(LPVOID)postData.c_str(),postData.size()); pFile->QueryInfoStatusCode(dwRet); if (dwRet == HTTP_STATUS_OK) { CString result, newline; while(pFile->ReadString(newline)) {//循环读取每行内容 result += newline+"\r\n"; } ofstream fout; fout.open("output.txt"); fout<<result; fout.close(); } else { return false; } delete pFile; delete pServer; } catch (CInternetException* pEx) { //catch errors from WinInet TCHAR pszError[200]; pEx->GetErrorMessage(pszError, 200); std::cout<<pszError<<std::endl;//显示异常信息 return false; } session.Close(); return true; } 服务端代码如下: public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); request.setCharacterEncoding("UTF-8"); PrintWriter out = response.getWriter(); String rel=request.getParameter("clientName").toString(); out.write(rel); }
应用程序崩溃,求解!!!
**具体是这样的:** MetaTrader是一款可编程的交易端(在其上编写的程序称为MQL程序),terminal.exe是MetaTrader的进程,MQL程序调用dll(VC++)进行网络通信(获取数据并显示在K线图表之上),在dll接口函数里开了一个线程等待并接收数据(当套接字有数据到来时,接收数据并返回给MQL程序),当把图表窗口关闭,如果发送端继续发送数据,此时交易端就会出现如下情况: ![图片说明](https://img-ask.csdn.net/upload/201506/25/1435209252_989823.png) **关闭程序后查看Windows日志,有下面两条:** 错误应用程序名称: terminal.exe,版本: 4.0.0.840,时间戳: 0x00ad7e00 错误模块名称: MSVCR100.dll_unloaded,版本: 0.0.0.0,时间戳: 0x4df2be1e 异常代码: 0xc0000005 错误偏移量: 0x6b26b65a 错误进程 ID: 0xe50 错误应用程序启动时间: 0x01d0aef99d666574 错误应用程序路径: C:\Program Files\FXCM MetaTrader 4\terminal.exe 错误模块路径: MSVCR100.dll 报告 ID: 103b0472-1aed-11e5-ba83-d027884f6667 错误应用程序名称: terminal.exe,版本: 4.0.0.840,时间戳: 0x00ad7e00 错误模块名称: Receive.dll_unloaded,版本: 0.0.0.0,时间戳: 0x558b792b 异常代码: 0xc0000005 错误偏移量: 0x5b791310 错误进程 ID: 0xe50 错误应用程序启动时间: 0x01d0aef99d666574 错误应用程序路径: C:\Program Files\FXCM MetaTrader 4\terminal.exe 错误模块路径: Receive.dll 报告 ID: 134ef7ab-1aed-11e5-ba83-d027884f6667
spring2.5事务注解
用到的是spring2.5的注解方式配置事务。 在接口中加入@Transactional这个就会报错,否则正常。 配置文件。 [code="java"]<?xml version="1.0" encoding="UTF-8" ?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"> <bean id="db-properties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" p:ignoreUnresolvablePlaceholders="true"> <property name="locations"> <list> <value>classpath:DataBase.properties </value> </list> </property> </bean> <tx:annotation-driven transaction-manager="transactionManager"/> <!-- 配置同一个数据源 --> <bean id="daoTemplate" abstract="true" lazy-init="true"> <property name="dataSource" ref="dataSource" /> </bean> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName"> <value>${db.driver}</value> </property> <property name="url"> <value>${db.url}</value> </property> <property name="username"> <value>${db.username}</value> </property> <property name="password"> <value>${db.password}</value> </property> <property name="initialSize"> <value>${db.pool.initial}</value> </property> <property name="maxActive"> <value>${db.pool.max}</value> </property> <property name="defaultAutoCommit" value="false" /> </bean> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager" p:dataSource-ref="dataSource" /> <bean id="threadPoolTaskExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor"> <property name="corePoolSize" value="2" /> <property name="keepAliveSeconds" value="200" /> <property name="maxPoolSize" value="10" /> <property name="queueCapacity" value="60" /> </bean> <bean id="transactionTemplate" class="org.springframework.transaction.support.TransactionTemplate"> <property name="transactionManager"> <ref bean="transactionManager" /> </property> </bean> </beans>[/code] 接口代码: [code="java"] import javax.jws.WebService; import javax.ws.rs.core.Response; import org.springframework.transaction.annotation.Transactional; import com.sns.bestv.entity.VisFclass; import com.sns.bestv.service.impl.VisFclassServiceImpl.Fclasses; @WebService @Transactional public interface VisFclassService { Response save(VisFclass fclass); Response delete(String app_key,int cid,String groupsids); Response update(VisFclass fclass); Fclasses get(String app_key,int cid); } [/code] 启动时候控制台错误信息: [code="java"] 2009-9-1 20:57:07 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: E:\java\jdk1.6.0_13\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;E:\java\jdk1.6.0_13\jre\bin;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Java\jdk1.6.0_13\BIN;C:\Program Files\Common Files\Adobe\AGL;;C:\Program Files\Common Files\Thunder Network\KanKan\Codecs;C:\Program Files\TortoiseSVN\bin;D:\;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin;d:\Program Files\SSH Secure Shell;C:\Program Files\SSH Communications Security\SSH Secure Shell 2009-9-1 20:57:07 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-8081 2009-9-1 20:57:07 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 763 ms 2009-9-1 20:57:07 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2009-9-1 20:57:07 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.18 log4j:ERROR Parsing error on line 30 and column 23 log4j:ERROR The content of element type "log4j:configuration" must match "(renderer*,appender*,(category|logger)*,root?,categoryFactory?)". 2009-9-1 20:57:08 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring root WebApplicationContext 20:57:08,359 INFO org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189): Root WebApplicationContext: initialization started 20:57:08,437 INFO org.springframework.context.support.AbstractApplicationContext.prepareRefresh(AbstractApplicationContext.java:411): Refreshing org.springframework.web.context.support.XmlWebApplicationContext@db95a1: display name [Root WebApplicationContext]; startup date [Tue Sep 01 20:57:08 CST 2009]; root of context hierarchy 20:57:08,609 INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:323): Loading XML bean definitions from class path resource [applicationContext.xml] 20:57:08,937 INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:323): Loading XML bean definitions from class path resource [serviceContext.xml] 20:57:09,000 INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:323): Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml] 20:57:09,046 INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:323): Loading XML bean definitions from class path resource [META-INF/cxf/cxf-extension-soap.xml] 20:57:09,093 INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:323): Loading XML bean definitions from class path resource [META-INF/cxf/cxf-servlet.xml] 20:57:09,187 INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:323): Loading XML bean definitions from class path resource [META-INF/cxf/cxf-extension-jaxrs-binding.xml] 20:57:09,296 INFO org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:426): Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@db95a1]: org.springframework.beans.factory.support.DefaultListableBeanFactory@138847d 20:57:09,671 INFO org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:178): Loading properties file from class path resource [DataBase.properties] 20:57:10,000 INFO org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:414): Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@138847d: defining beans [db-properties,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,daoTemplate,dataSource,transactionManager,userDao,customerDao,custUserDao,aipUsersDao,aipLogDao,postDao,friendDao,messageDao,fclassDao,userClassDao,customizeDao,threadPoolTaskExecutor,transactionTemplate,cxf,org.apache.cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.transport.servlet.ServletTransportFactory,org.apache.cxf.jaxrs.JAXRSBindingFactory,userServices,profileService,postService,friendService,messageService,groupService,custermerService,customizeService,userServices_wa]; root of factory hierarchy 20:57:10,500 INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor.initialize(ThreadPoolTaskExecutor.java:250): Initializing ThreadPoolExecutor 'threadPoolTaskExecutor' 2009-9-1 20:57:12 org.apache.cxf.jaxrs.utils.InjectionUtils reportServerError 严重: Method setMessageContext injection failure 20:57:12,968 INFO org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:421): Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@138847d: defining beans [db-properties,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,daoTemplate,dataSource,transactionManager,userDao,customerDao,custUserDao,aipUsersDao,aipLogDao,postDao,friendDao,messageDao,fclassDao,userClassDao,customizeDao,threadPoolTaskExecutor,transactionTemplate,cxf,org.apache.cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.transport.servlet.ServletTransportFactory,org.apache.cxf.jaxrs.JAXRSBindingFactory,userServices,profileService,postService,friendService,messageService,groupService,custermerService,customizeService,userServices_wa]; root of factory hierarchy 20:57:12,984 INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor.shutdown(ThreadPoolTaskExecutor.java:349): Shutting down ThreadPoolExecutor 'threadPoolTaskExecutor' 20:57:12,984 ERROR org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:215): Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userServices_wa': Invocation of init method failed; nested exception is org.apache.cxf.service.factory.ServiceConstructionException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: org.apache.cxf.service.factory.ServiceConstructionException at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335) ... 30 more Caused by: javax.ws.rs.WebApplicationException at org.apache.cxf.jaxrs.utils.InjectionUtils.reportServerError(InjectionUtils.java:277) at org.apache.cxf.jaxrs.utils.InjectionUtils.injectThroughMethod(InjectionUtils.java:190) at org.apache.cxf.jaxrs.utils.InjectionUtils.injectContextProxies(InjectionUtils.java:656) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.injectContexts(JAXRSServerFactoryBean.java:180) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.updateClassResourceProviders(JAXRSServerFactoryBean.java:201) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:81) ... 37 more 2009-9-1 20:57:13 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userServices_wa': Invocation of init method failed; nested exception is org.apache.cxf.service.factory.ServiceConstructionException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: org.apache.cxf.service.factory.ServiceConstructionException at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335) ... 30 more Caused by: javax.ws.rs.WebApplicationException at org.apache.cxf.jaxrs.utils.InjectionUtils.reportServerError(InjectionUtils.java:277) at org.apache.cxf.jaxrs.utils.InjectionUtils.injectThroughMethod(InjectionUtils.java:190) at org.apache.cxf.jaxrs.utils.InjectionUtils.injectContextProxies(InjectionUtils.java:656) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.injectContexts(JAXRSServerFactoryBean.java:180) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.updateClassResourceProviders(JAXRSServerFactoryBean.java:201) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:81) ... 37 more 2009-9-1 20:57:13 org.apache.catalina.core.StandardContext start 严重: Error listenerStart 2009-9-1 20:57:13 org.apache.catalina.core.StandardContext start 严重: Context [] startup failed due to previous errors 2009-9-1 20:57:13 org.apache.catalina.core.ApplicationContext log 信息: Closing Spring root WebApplicationContext 2009-9-1 20:57:13 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-8081 2009-9-1 20:57:13 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:9009 2009-9-1 20:57:13 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/47 config=null 2009-9-1 20:57:13 org.apache.catalina.startup.Catalina start 信息: Server startup in 6270 ms [/code] [b]问题补充:[/b] 1:@Transactional 不是说用注解就得用接口吗?你说的加到实现类上我也试了一样的错误。 2:[code="java"]<bean id="threadPoolTaskExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor"> <property name="corePoolSize" value="2" /> <property name="keepAliveSeconds" value="200" /> <property name="maxPoolSize" value="10" /> <property name="queueCapacity" value="60" /> </bean> [/code] 这是连接池的东西。 3: <!-- 定义切入点,引用事务通知 --> [code="java"]<aop:config proxy-target-class="true"> <aop:advisor advice-ref="txAdvice" pointcut="execution (* com.mobile.dao.*.*(..))"/>[/code] </aop:config> 这种方式我试过了。也会出错。 [b]4:其二,既然你要用注解的方式,那么你就要在你的项目中,加入这两个jar包:aspectjweaver.jar aspectjrt.jar 我好像没加这两个包。我加加试试。[/b] 5:配置文件哪里有问题?如果我不在接口或类上加@Transactional 就是完全正确的运行。 谢谢!请帮忙! [b]问题补充:[/b] [b]再补充:两个包我加了,还是一样的错误。而且那两个包是aop才需要的吧?[/b] [b]问题补充:[/b] [b][color=darkred]yangtao309[/color][/b] 按照你说的把那个多余的连接池delete了。程序不会出错了。 但是不会回滚事务? 那我另问一下:[color=blue]我把@Transactional(readOnly=false) public Response addCustomer(VisCustomer cut) 放在一个接口的实现类的方法上面,那是不是就说我这个方法体都具有一个相同的事务呢?只要其中一个地方出错整个方法都执行失败? 因为我这个方法内不止使用了一个dao的一个方法,有多个方法。比如我现在有 table1,table1-2(关系表),table2 我现在要操作table1,给其insert ,insert之后要向 table1-2中添加一条数据,这时我添加table1-2时出错了,那么我操作table1的数据可以回滚吗? [/color] [b]问题补充:[/b] [b]我添加table1-2时并没有异常,是在数据库中被回滚的,程序中执行是正确的。这样能把它在程序中就回滚了吗?我正在看spring2.5的开发参考手册,其中rollbackForClassname 是定义一组类的名字,必须是Throwable的子类,遇到时必须回滚。如果我产生不了异常不就是说还是回滚不了?[/b] [b]问题补充:[/b] [quote]@Transactional(readOnly=false,rollbackFor = Throwable.class)[/quote] 不能回滚事务。肯定还有地方不对。但是配置我想是没问题了。看了api现在完全按照上面来了。非常非常感谢[color=olive]yangtao309 [/color]
请教各位大神有关c++ stack overflow错误
DEBUG提示错误: ``` First-chance Exception in ConvexHull.exe(NTDLL.DLL);0xC00000FD:Stack Overflow ``` 点击ALT+7之后查看调用栈内容如下: ``` NTDLL! 77452c33() NTDLL! 77455ae0() NTDLL! 774c5f63() NTDLL! 7748a40a() NTDLL! 77455ae0() _heap_alloc_base(unsigned int 64) line 200 _heap_alloc_dbg(unsigned int 16, int 1, const char * 0x00000000, int 0) line 378 + 9 bytes _nh_malloc_dbg(unsigned int 16, int 1, int 1, const char * 0x00000000, int 0) line 248 + 21 bytes _nh_malloc(unsigned int 16, int 1) line 197 + 19 bytes operator new(unsigned int 16) line 24 + 11 bytes std::_Allocate(int 1, dot * 0x00000000) line 30 + 12 bytes std::allocator<dot>::allocate(unsigned int 1, const void * 0x00000000) line 59 + 40 bytes std::vector<dot,std::allocator<dot> >::insert(dot * 0x00000000, unsigned int 1, const dot & {...}) line 158 + 14 bytes std::vector<dot,std::allocator<dot> >::insert(dot * 0x00000000, const dot & {...}) line 154 std::vector<dot,std::allocator<dot> >::push_back(const dot & {...}) line 142 + 50 bytes Divide(dot {...}, dot {...}, std::vector<dot,std::allocator<dot> > {...}) line 63 Divide(dot {...}, dot {...}, std::vector<dot,std::allocator<dot> > {...}) line 77 + 119 bytes Divide(dot {...}, dot {...}, std::vector<dot,std::allocator<dot> > {...}) line 77 + 119 bytes Divide(dot {...}, dot {...}, std::vector<dot,std::allocator<dot> > {...}) line 77 + 119 bytes Divide(dot {...}, dot {...}, std::vector<dot,std::allocator<dot> > {...}) line 77 + 119 bytes Divide(dot {...}, dot {...}, std::vector<dot,std::allocator<dot> > {...}) line 77 + 119 bytes Divide(dot {...}, dot {...}, std::vector<dot,std::allocator<dot> > {...}) line 77 + 119 bytes ...... ``` 使用的是VC6.0,编译器就是VC6.0默认的。 本人是个菜鸟,根据调用栈给出的内容完全不知道如何定位错误。 本人的程序是快速凸包算法(一个课后作业),程序在数据量比较少的情况下,点的个数在1000以下都运行正常,程序逻辑没有错误,当数据量增大到2000、3000的时候程序就提示出上述异常。 顺便说一下设置栈保留大小也已经试过了,将栈保留大小设置为16000000也无效。 以下是本人代码: ``` // ConvexHull.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "dot.h" #include <iostream> #include <vector> #include "BruteForceCH.h" #include "line.h" #include <windows.h> #include <time.h> #include <fstream> #include "comm.h" #include "GrahamScan.h" #include <stack> #include "QuickTuBao.h" #define random(x) (rand()%x) using namespace std; int main(int argc, char* argv[]) { int n; printf("input dots number:\n"); cin >> n; //随机点生成算法 //* vector<dot> vec; srand((int)time(0)); for(int i=0;i<n;) { dot d; d.x = random(100) + (float)random(10)/(float)10; d.y = random(100) + (float)random(10)/(float)10; //d.x = random(10); //d.y = random(10); if(find(vec.begin(),vec.end(),d) != vec.end()); else { vec.push_back(d); i++; } } //*/ //将生成的点写入文件,便于MATLAB读入 ofstream f1("C:\\MATLAB7\\work\\dot\\dots.txt");//打开文件用于写,若文件不存在就创建它 if(!f1) return 0;//打开文件失败则结束运行 vector<dot>::iterator it; for(it=vec.begin();it!=vec.end();it++) { dot d = *it; //cout<<d.x<<","<<d.y<<endl; f1<<d.x<<" "<<d.y<<endl; } f1.close();//关闭文件 //记录运行时间 LARGE_INTEGER BegainTime ; LARGE_INTEGER EndTime ; LARGE_INTEGER Frequency ; QueryPerformanceFrequency(&Frequency); QueryPerformanceCounter(&BegainTime) ; QuickTuBao(vec); QueryPerformanceCounter(&EndTime); //输出运行时间(单位:s) cout << "运行时间(单位:s):" <<(double)( EndTime.QuadPart - BegainTime.QuadPart )/ Frequency.QuadPart <<endl; //将结果写入文件 ofstream f2("C:\\MATLAB7\\work\\dot\\outdots.txt");//打开文件用于写,若文件不存在就创建它 if(!f2) return 0;//打开文件失败则结束运行 //vector<dot>::iterator it; for(it=vec.begin();it!=vec.end();it++) { dot d = *it; f2<<d.x<<" "<<d.y<<endl; } it=vec.begin(); dot d = *it; f2<<d.x<<" "<<d.y<<endl; f2.close();//关闭文件 system("pause") ; return 0; } ``` ``` // QuickTuBao.cpp : 快速凸包算法的具体实现代码. // #include "stdafx.h" #include "QuickTuBao.h" //#pragma comment(linker,stack:16000000,16000000) static vector<dot> outpts;//点集pts的凸包 //计算三角形的有向面积 double getArea(dot p1, dot p2, dot p3) { return p1.x * p2.y + p3.x * p1.y + p2.x * p3.y - p3.x * p2.y - p2.x * p1.y - p1.x * p3.y; } //计算叉乘 float cross(dot pi, dot top, dot ntop) { return (pi.x-ntop.x)*(top.y-ntop.y) - (top.x-ntop.x)*(pi.y-ntop.y); } //递归 void Divide(dot d1, dot d2, vector<dot> ptsleft) { vector<dot>::iterator it; if(ptsleft.empty()) { if(find(outpts.begin(),outpts.end(),d1) == outpts.end()) outpts.push_back(d1); if(find(outpts.begin(),outpts.end(),d2) == outpts.end()) outpts.push_back(d2); return; } //寻找pMax,面积最大的就是pMax double area = 0, maxArea = 0; dot pMax = d1; for(it=ptsleft.begin();it!=ptsleft.end();it++) { area = abs(getArea(d1, d2, *it)); if(area > maxArea) { pMax = *it; maxArea = area; } } //找出位于(p1, pMax)直线左边的点集s1 //找出位于(pMax, p2)直线左边的点集s2 vector<dot> s1; vector<dot> s2; dot d; for(it=ptsleft.begin();it!=ptsleft.end();it++) { d = *it; if(getArea(d1,pMax,d) > 0) s1.push_back(d);//d属于左(上) else if(getArea(pMax,d2,d) > 0) s2.push_back(d);//d属于右(下) } /* cout<<"------------s1---------"<<endl; for(it=s1.begin();it!=s1.end();it++) { cout<<*it<<endl; } cout<<"------------s2---------"<<endl; for(it=s2.begin();it!=s2.end();it++) { cout<<*it<<endl; } */ //递归 Divide(d1, pMax, s1);//分别求解 Divide(pMax, d2, s2);//分别求解 } void QuickTuBao(vector<dot> &vec) { //按x轴对pts排序 sort(vec.begin(),vec.end(),lessCompare); dot d1 = vec[0];//最左边的点 dot d2 = vec[vec.size()-1];//最右边的点,用直线p1p2将原凸包分成两个小凸包 cout<<d1<<endl; cout<<d2<<endl; //左右凸包点集 vector<dot> ptsleft; vector<dot> ptsright; //穷举所有的点,将点集按照直线d1d2分为左右两个凸包(上下凸包) dot d; vector<dot>::iterator it; for(it=vec.begin();it!=vec.end();it++) { d = *it; double area = getArea(d1,d2,d); if(area > 0) ptsleft.push_back(d);//d属于左(上) else if(area < 0) ptsright.push_back(d);//d属于右(下) } Divide(d1, d2, ptsleft);//分别求解 Divide(d2, d1, ptsright);//分别求解 vec = outpts; //去除共线的点 vector<dot> in; int size = vec.size(); int j,k; for(int i=0;i<size;i++) { j=(i+1)%size; k=(i+2)%size; if(cross(vec[j],vec[k],vec[i]) == 0) { //加入内点 in.push_back(vec[j]); } } for(it=vec.begin();it!=vec.end();) { d = *it; if(find(in.begin(),in.end(),d) != in.end()) it = vec.erase(it); else it++; } } ```
求大神~~ c free()结构体指针出错
本人菜鸟一枚,调试程序时发现下面的程序只要用free()来释放结构体指针就出错,百思不得其解,望大师指正!非常感谢啦! 注:本人用的是VC6.0。自己写的C程序,私心揣测难道是结构体指针特殊一点,或者我释放的方式不对~ 补充:C-Free 5.0上选择mingw5调试则没有问题!到底哪里有问题? ![图片说明](https://img-ask.csdn.net/upload/201604/15/1460689437_553769.jpg) ``` #include <stdio.h> #include <stdlib.h> #include <malloc.h> struct Particle{ int age; double money; double famly[4]; };//定义一个结构体变量 int main() { int PM=5,i,j; double *ptr=(double *)calloc(PM,sizeof(double)); struct Particle *swarm=(struct Particle *)calloc(PM,sizeof(struct Particle)); if(swarm==NULL) {printf("给swarm申请内存失败!\n"); exit(1);//异常退出 } else printf("给swarm申请内存成功!\n"); for(i=0;i<PM;i++,swarm++) //对结构体指针赋值并输出 { swarm->age=2*i; swarm->money=3*i+0.55; printf("swarm[%d]: age=%d,money=%lf ",i,swarm->age,swarm->money); for(j=0;j<4;j++) {swarm->famly[j]=1.5*j;printf("%lf ,",swarm->famly[j]);} printf("\n"); } printf("\n");//对double型数组赋值并输出 for(i=0;i<PM;i++) printf("%lf\n",ptr[i]+i*0.5); printf("\n"); free(ptr);ptr=0; //free(swarm);swarm=NULL; //为什么上面语句一添加程序运行就出问题呢??!!而free(ptr)就没问题? printf("\n\n"); } ```
Tomcat 宕机,经长时间调试仍然存在~待帮助~
老服务器中运行一个系统,tomcat没有任何问题,可是换到新买的服务器上,tomcat就出现了宕机的现象。 通过JProfiler监控内存使用,开始发现heap大小合适,只是回收不及时,然后处理了一下回收,现在heap使用基本就在85m大小,没有泄露。 catalina.bat中设置的是 -Xms800m,-Xmx800m,-XX:NewSize=256m,-XX:MaxNewSize=256m heap设置了800m,现在只用了85m左右,没有再累加,并未出现泄露 但是现在又宕机了,原因不明,把tomcat 的log放出来,希望童鞋们帮忙看一下,谢谢! # # An unexpected error has been detected by Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c95b583, pid=3308, tid=4044 # # Java VM: Java HotSpot(TM) Server VM (11.0-b15 mixed mode windows-x86) # Problematic frame: # C [ntdll.dll+0x2b583] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # --------------- T H R E A D --------------- Current thread (0x0570d800): JavaThread "http-80-2" daemon [_thread_in_native, id=4044, stack(0x09b30000,0x09b80000)] siginfo: ExceptionCode=0xc0000005, writing address 0x54455800 Registers: EAX=0x0571a898, EBX=0x000004ee, ECX=0x54455800, EDX=0x20544547 ESP=0x09b7ed70, EBP=0x09b7ed88, ESI=0x0571a890, EDI=0x00300000 EIP=0x7c95b583, EFLAGS=0x00010287 Top of Stack: (sp=0x09b7ed70) 0x09b7ed70: 0571a890 0571a890 00300000 05470000 0x09b7ed80: 05470000 04c70000 09b7edd0 7c95ba81 0x09b7ed90: 000004ee 0071a890 000004ee 00300000 0x09b7eda0: 0571a890 00000000 00000000 0571d000 0x09b7edb0: 09b7edcc 05470000 00000000 0571d000 0x09b7edc0: 00000000 000000ee 00000000 00000000 0x09b7edd0: 09b7eeb4 7c95b646 0571b000 00002000 0x09b7ede0: 000004ee 000001bd 0571a898 00002000 Instructions: (pc=0x7c95b583) 0x7c95b573: 00 00 8b d0 8b 4a 04 8d 46 08 89 10 89 48 04 56 0x7c95b583: 89 01 57 89 42 04 e8 37 f0 ff ff 89 5d 08 0f b7 Stack: [0x09b30000,0x09b80000], sp=0x09b7ed70, free space=315k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [ntdll.dll+0x2b583] C [ntdll.dll+0x2ba81] C [ntdll.dll+0x2b646] C [msvcr71.dll+0x218a] C [net.dll+0x710e] j java.net.SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I+0 j java.net.SocketInputStream.read([BII)I+119 j org.apache.coyote.http11.InternalInputBuffer.fill()Z+59 Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j java.net.SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I+0 j java.net.SocketInputStream.read([BII)I+119 j org.apache.coyote.http11.InternalInputBuffer.fill()Z+59 J org.apache.coyote.http11.InternalInputBuffer.parseRequestLine()V j org.apache.coyote.http11.Http11Processor.process(Ljava/net/Socket;)V+234 j org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Ljava/net/Socket;)Z+82 j org.apache.tomcat.util.net.JIoEndpoint$Worker.run()V+58 j java.lang.Thread.run()V+11 v ~StubRoutines::call_stub --------------- P R O C E S S --------------- Java Threads: ( => current thread ) 0x09334800 JavaThread "http-80-12" daemon [_thread_blocked, id=380, stack(0x0a370000,0x0a3c0000)] 0x04e15400 JavaThread "http-80-11" daemon [_thread_blocked, id=2896, stack(0x0a320000,0x0a370000)] 0x08b5e400 JavaThread "http-80-10" daemon [_thread_blocked, id=2884, stack(0x0a2d0000,0x0a320000)] 0x055be400 JavaThread "http-80-9" daemon [_thread_blocked, id=2876, stack(0x0a260000,0x0a2b0000)] 0x07b6f800 JavaThread "http-80-8" daemon [_thread_blocked, id=3620, stack(0x0a040000,0x0a090000)] 0x04d6ec00 JavaThread "AWT-Windows" daemon [_thread_in_native, id=3992, stack(0x0a090000,0x0a0e0000)] 0x06e3dc00 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=4012, stack(0x09ff0000,0x0a040000)] 0x07fcf800 JavaThread "http-80-7" daemon [_thread_blocked, id=168, stack(0x09c20000,0x09c70000)] 0x06246400 JavaThread "http-80-6" daemon [_thread_blocked, id=3844, stack(0x09bd0000,0x09c20000)] 0x05495400 JavaThread "http-80-5" daemon [_thread_blocked, id=3968, stack(0x07980000,0x079d0000)] 0x0555b400 JavaThread "http-80-4" daemon [_thread_blocked, id=4072, stack(0x07930000,0x07980000)] 0x05507400 JavaThread "TP-Monitor" daemon [_thread_blocked, id=4024, stack(0x09e40000,0x09e90000)] 0x07e4ac00 JavaThread "TP-Processor4" daemon [_thread_in_native, id=4020, stack(0x09df0000,0x09e40000)] 0x05897800 JavaThread "TP-Processor3" daemon [_thread_blocked, id=4016, stack(0x09da0000,0x09df0000)] 0x05897400 JavaThread "TP-Processor2" daemon [_thread_blocked, id=4028, stack(0x09d50000,0x09da0000)] 0x07fcac00 JavaThread "TP-Processor1" daemon [_thread_blocked, id=4036, stack(0x09d00000,0x09d50000)] 0x07a8d400 JavaThread "http-80-3" daemon [_thread_in_native, id=4032, stack(0x09b80000,0x09bd0000)] =>0x0570d800 JavaThread "http-80-2" daemon [_thread_in_native, id=4044, stack(0x09b30000,0x09b80000)] 0x05a69c00 JavaThread "http-80-1" daemon [_thread_blocked, id=4040, stack(0x09ae0000,0x09b30000)] 0x080fec00 JavaThread "http-80-Acceptor-0" daemon [_thread_in_native, id=4048, stack(0x09a90000,0x09ae0000)] 0x06dd3c00 JavaThread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon [_thread_blocked, id=4056, stack(0x09a40000,0x09a90000)] 0x06e7dc00 JavaThread "Timer-1" [_thread_in_native, id=3680, stack(0x099f0000,0x09a40000)] 0x06a88400 JavaThread "Timer-0" [_thread_blocked, id=3316, stack(0x070e0000,0x07130000)] 0x04da3800 JavaThread "_jprofiler_sampler" daemon [_thread_blocked, id=3868, stack(0x05410000,0x05460000)] 0x04d3fc00 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3700, stack(0x05370000,0x053c0000)] 0x04d1a800 JavaThread "CompilerThread1" daemon [_thread_blocked, id=3692, stack(0x05320000,0x05370000)] 0x04d1a400 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3736, stack(0x052d0000,0x05320000)] 0x04a0f800 JavaThread "_jprofiler_native_sampler" daemon [_thread_in_native, id=3740, stack(0x05230000,0x05280000)] 0x049f9800 JavaThread "_jprofiler_native_comm" daemon [_thread_in_native, id=3712, stack(0x051a0000,0x051f0000)] 0x049d7800 JavaThread "Attach Listener" daemon [_thread_blocked, id=2880, stack(0x05150000,0x051a0000)] 0x049d6c00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=3752, stack(0x05100000,0x05150000)] 0x040aec00 JavaThread "Finalizer" daemon [_thread_blocked, id=3748, stack(0x04ab0000,0x04b00000)] 0x04989800 JavaThread "Reference Handler" daemon [_thread_blocked, id=3756, stack(0x04a60000,0x04ab0000)] 0x00307400 JavaThread "main" [_thread_in_native, id=2968, stack(0x00900000,0x00950000)] Other Threads: 0x040a3c00 VMThread [stack: 0x04a10000,0x04a60000] [id=3760] 0x04d1b400 WatcherThread [stack: 0x053c0000,0x05410000] [id=3704] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap PSYoungGen total 249472K, used 4778K [0x3a110000, 0x4a110000, 0x4a110000) eden space 235968K, 2% used [0x3a110000,0x3a5babb8,0x48780000) from space 13504K, 0% used [0x493e0000,0x493e0000,0x4a110000) to space 12672K, 0% used [0x48780000,0x48780000,0x493e0000) PSOldGen total 557056K, used 75307K [0x18110000, 0x3a110000, 0x3a110000) object space 557056K, 13% used [0x18110000,0x1ca9ae40,0x3a110000) PSPermGen total 65536K, used 35163K [0x10110000, 0x14110000, 0x18110000) object space 65536K, 53% used [0x10110000,0x12366e98,0x14110000) /******************************************/ 这里看各处内存都正常使用,并没有异常,但是还是宕机。 Dynamic libraries: 0x00400000 - 0x00424000 C:\jdk6\bin\java.exe 0x7c930000 - 0x7ca00000 C:\WINDOWS\system32\ntdll.dll 0x7c800000 - 0x7c92b000 C:\WINDOWS\system32\kernel32.dll 0x77f30000 - 0x77fdb000 C:\WINDOWS\system32\ADVAPI32.dll 0x77c20000 - 0x77cbf000 C:\WINDOWS\system32\RPCRT4.dll 0x76eb0000 - 0x76ec3000 C:\WINDOWS\system32\Secur32.dll 0x7c340000 - 0x7c396000 C:\jdk6\jre\bin\msvcr71.dll 0x6db30000 - 0x6def4000 C:\jdk6\jre\bin\server\jvm.dll 0x77e10000 - 0x77ea0000 C:\WINDOWS\system32\USER32.dll 0x77bd0000 - 0x77c19000 C:\WINDOWS\system32\GDI32.dll 0x769e0000 - 0x76a0a000 C:\WINDOWS\system32\WINMM.dll 0x76180000 - 0x7619d000 C:\WINDOWS\system32\IMM32.DLL 0x7f000000 - 0x7f009000 C:\WINDOWS\system32\LPK.DLL 0x74ae0000 - 0x74b45000 C:\WINDOWS\system32\USP10.dll 0x71b20000 - 0x71b28000 C:\WINDOWS\system32\rdpsnd.dll 0x77f10000 - 0x77f21000 C:\WINDOWS\system32\WINSTA.dll 0x77b70000 - 0x77bca000 C:\WINDOWS\system32\msvcrt.dll 0x71ba0000 - 0x71bf7000 C:\WINDOWS\system32\NETAPI32.dll 0x76ab0000 - 0x76abb000 C:\WINDOWS\system32\PSAPI.DLL 0x6d330000 - 0x6d338000 C:\jdk6\jre\bin\hpi.dll 0x10000000 - 0x10102000 C:\PROGRA~1\JPROFI~1\bin\windows\jprofilerti.dll 0x71b10000 - 0x71b1b000 C:\WINDOWS\system32\WSOCK32.dll 0x71b60000 - 0x71b77000 C:\WINDOWS\system32\WS2_32.dll 0x71b50000 - 0x71b58000 C:\WINDOWS\system32\WS2HELP.dll 0x6d860000 - 0x6d86c000 C:\jdk6\jre\bin\verify.dll 0x6d3d0000 - 0x6d3ef000 C:\jdk6\jre\bin\java.dll 0x6d8a0000 - 0x6d8af000 C:\jdk6\jre\bin\zip.dll 0x71a80000 - 0x71ac0000 C:\WINDOWS\system32\mswsock.dll 0x69660000 - 0x696b7000 C:\WINDOWS\system32\hnetcfg.dll 0x71a40000 - 0x71a48000 C:\WINDOWS\System32\wshtcpip.dll 0x6d610000 - 0x6d619000 C:\jdk6\jre\bin\management.dll 0x6d6c0000 - 0x6d6d3000 C:\jdk6\jre\bin\net.dll 0x76e30000 - 0x76e5b000 C:\WINDOWS\system32\DNSAPI.dll 0x76ed0000 - 0x76ed7000 C:\WINDOWS\System32\winrnr.dll 0x76e70000 - 0x76e9e000 C:\WINDOWS\system32\WLDAP32.dll 0x76ee0000 - 0x76ee5000 C:\WINDOWS\system32\rasadhlp.dll 0x6d0b0000 - 0x6d1e8000 C:\jdk6\jre\bin\awt.dll 0x72f40000 - 0x72f67000 C:\WINDOWS\system32\WINSPOOL.DRV 0x774b0000 - 0x775e9000 C:\WINDOWS\system32\ole32.dll 0x77370000 - 0x77407000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_5.82.3790.3959_x-ww_78FCF8D0\comctl32.dll 0x0a0e0000 - 0x0a150000 d:\Program Files\360\360safe\safemon\safemon.dll 0x7ca10000 - 0x7d1ec000 C:\WINDOWS\system32\SHELL32.dll 0x77eb0000 - 0x77f02000 C:\WINDOWS\system32\SHLWAPI.dll 0x775f0000 - 0x7767b000 C:\WINDOWS\system32\OLEAUT32.dll 0x76170000 - 0x76175000 C:\WINDOWS\system32\MSIMG32.dll 0x0a160000 - 0x0a1c5000 C:\WINDOWS\system32\MSVCP60.dll 0x779e0000 - 0x77a87000 C:\WINDOWS\system32\WININET.dll 0x760a0000 - 0x76131000 C:\WINDOWS\system32\CRYPT32.dll 0x76080000 - 0x76092000 C:\WINDOWS\system32\MSASN1.dll 0x77b60000 - 0x77b68000 C:\WINDOWS\system32\VERSION.dll 0x77250000 - 0x772fe000 C:\WINDOWS\system32\urlmon.dll 0x77cd0000 - 0x77dd3000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.3790.3959_x-ww_D8713E55\comctl32.dll 0x74430000 - 0x74480000 C:\WINDOWS\system32\MSCTF.dll 0x75d60000 - 0x75d87000 C:\WINDOWS\system32\apphelp.dll 0x4c510000 - 0x4c53e000 C:\WINDOWS\system32\msctfime.ime 0x6d2d0000 - 0x6d324000 C:\jdk6\jre\bin\fontmanager.dll 0x6d240000 - 0x6d263000 C:\jdk6\jre\bin\dcpr.dll 0x6d6e0000 - 0x6d6e9000 C:\jdk6\jre\bin\nio.dll VM Arguments: jvm_args: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=E:\tomcat6\conf\logging.properties -Xms800m -Xmx800m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=64m -XX:MaxPermSize=128m -agentpath:C:\PROGRA~1\JPROFI~1\bin\windows\jprofilerti.dll=port=8849 -Djava.endorsed.dirs=E:\tomcat6\endorsed -Dcatalina.base=E:\tomcat6 -Dcatalina.home=E:\tomcat6 -Djava.io.tmpdir=E:\tomcat6\temp java_command: org.apache.catalina.startup.Bootstrap start Launcher Type: SUN_STANDARD Environment Variables: JAVA_HOME=C:\jdk6 JRE_HOME=C:\jdk6 CLASSPATH=C:\jdk6\lib\tools.jar;E:\tomcat6\bin\bootstrap.jar PATH=C:\jdk6\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\jdk6\bin\..\jre\bin USERNAME=Administrator OS=Windows_NT PROCESSOR_IDENTIFIER=x86 Family 6 Model 29 Stepping 1, GenuineIntel --------------- S Y S T E M --------------- OS: Windows Server 2003 family Build 3790 Service Pack 2 CPU:total 24 (8 cores per cpu, 1 threads per core) family 6 model 13 stepping 1, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3 Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k free) vm_info: Java HotSpot(TM) Server VM (11.0-b15) for windows-x86 JRE (1.6.0_10-rc2-b32), built on Sep 12 2008 00:47:31 by "java_re" with MS VC++ 7.1 time: Fri Oct 22 11:24:09 2010 elapsed time: 6040 seconds
vc++ 采用ado方式连接access数据库
连接数据库代码如下,当解决方案平台采用win32时,数据库连接正确,当采用x64时抛出异常(0x800aA0E7A),请问在x64下如何连接access数据库? ``` #import "c:\program files\common files\system\ado\msado15.dll" \ no_namespace rename("EOF","adoEOF") AfxOleInit (); m_pConnection .CreateInstance ("ADODB.Connection"); /*****连接数据库*****/ try { m_pConnection ->ConnectionTimeout =6; m_pConnection ->Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\\scpi.mdb" ,"","",adConnectUnspecified ); } catch (_com_error e)//捕捉异常 { AfxMessageBox (e.ErrorMessage()); return false ; } ```
未处理的异常,Cannot find or open the PDB file,访问冲突
问题 “Geometry.exe”: 已加载“E:\opencascade\OpenCASCADE6.9.0\opencascade-6.9.0\samples\mfc\standard\win64\vc10\bind\Geometry.exe”,已加载符号。 “Geometry.exe”: 已加载“C:\Windows\System32\ntdll.dll”,Cannot find or open the PDB file “Geometry.exe”: 已加载“C:\Windows\System32\kernel32.dll”,Cannot find or open the PDB file “Geometry.exe”: 已加载“C:\Windows\System32\KernelBase.dll”,Cannot find or open the PDB file “Geometry.exe”: 已加载“E:\opencascade\OpenCASCADE6.9.0\occdll\TKBRep.dll”,未使用调试信息生成二进制文件。 “Geometry.exe”: 已加载“E:\opencascade\OpenCASCADE6.9.0\occdll\TKMath.dll”,未使用调试信息生成二进制文件。 “Geometry.exe”: 已加载“E:\opencascade\OpenCASCADE6.9.0\occdll\TKernel.dll”,未使用调试信息生成二进制文件。 “Geometry.exe”: 已加载“C:\Windows\System32\advapi32.dll”,Cannot find or open the PDB file “Geometry.exe”: 已加载“C:\Windows\System32\msvcrt.dll”,Cannot find or open the PDB file “Geometry.exe”: 已加载“C:\Windows\System32\sechost.dll”,Cannot find or open the PDB file “Geometry.exe”: 已加载“C:\Windows\System32\rpcrt4.dll”,Cannot find or open the PDB file “Geometry.exe”: 已加载“C:\Windows\System32\user32.dll”,Cannot find or open the PDB file “Geometry.exe”: 已加载“C:\Windows\System32\gdi32.dll”,Cannot find or open the PDB file “Geometry.exe”: 已加载“C:\Windows\System32\lpk.dll”,Cannot find or open the PDB file “Geometry.exe”: 已加载“C:\Windows\System32\usp10.dll”,Cannot find or open the PDB file 原程序 // This is a part of the Microsoft Foundation Classes C++ library. // Copyright (C) 1992-1995 Microsoft Corporation // All rights reserved. // // This source code is only intended as a supplement to the // Microsoft Foundation Classes Reference and related // electronic documentation provided with the library. // See these sources for detailed information regarding the // Microsoft Foundation Classes product. #include "stdafx.h" #include <Standard_ErrorHandler.hxx> #include <Standard_SStream.hxx> #include <Standard_Failure.hxx> #include <Message.hxx> #include <Message_Messenger.hxx> #include <Message_PrinterOStream.hxx> #ifdef AFX_CORE1_SEG #pragma code_seg(AFX_CORE1_SEG) #endif ///////////////////////////////////////////////////////////////////////////// // Standard WinMain implementation // Can be replaced as long as 'AfxWinInit' is called first // for cout redefinition : #include <io.h> // for _open_osfhandle #include <fcntl.h> // for _O_TEXT #ifdef _DEBUG #define DISPLAYCONSOLE 1 #endif int AFXAPI AfxWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { #ifdef DISPLAYCONSOLE // Redirection of standard output to console int hCrt; BOOL rep; FILE *hf; _SYSTEM_INFO lps; GetSystemInfo(&lps); rep = AllocConsole(); hCrt = _open_osfhandle((long) GetStdHandle(STD_OUTPUT_HANDLE),_O_TEXT); hf = _fdopen( hCrt, "w" ); *stdout = *hf; // stop the buffer on stdout // int i = setvbuf( stdout, NULL, _IONBF, 0 ); // filebuf ff(hCrt); // cout = &ff; cout<<"This Debug Window is defined in WinMain.cpp and will disappear in release mode"<<endl; #endif // DISPLAYCONSOLE // By Matra // create log file for all OCC messages // Message::DefaultMessenger()->AddPrinter (new Message_PrinterOStream ("OCCSampleRun.log", Standard_False)); ASSERT(hPrevInstance == NULL); int nReturnCode = -1; CWinApp* pApp = AfxGetApp(); // new in 2.0 CAS.CADE uses the standard C++ exception mechanism /*#ifdef _DEBUG // By Matra // _Function declaratiob here because you can jump to InitFailure Standard_ErrorHandler _Function; #endif // _DEBUG // By Matra */ // AFX internal initialization if (!AfxWinInit(hInstance, hPrevInstance, lpCmdLine, nCmdShow)) goto InitFailure; // App global initializations (rare) ASSERT_VALID(pApp); if (!pApp->InitApplication()) goto InitFailure; ASSERT_VALID(pApp); // Perform specific initializations if (!pApp->InitInstance()) { if (pApp->m_pMainWnd != NULL) { TRACE0("Warning: Destroying non-NULL m_pMainWnd\n"); pApp->m_pMainWnd->DestroyWindow(); } nReturnCode = pApp->ExitInstance(); goto InitFailure; } ASSERT_VALID(pApp); #ifdef _DEBUG // By Matra Application: // new in 2.0 CAS.CADE uses the standard C++ exception mechanism // if(DoesNotAbort(_Function)) try { nReturnCode = pApp->Run(); } // if(_Function.Catches(STANDARD_TYPE(Standard_Failure))) catch(Standard_Failure) { Standard_SStream ostr; ostr<<Standard_Failure::Caught()<<"\n\0"; CString aMsg = ostr.str().c_str(); MessageBoxW (NULL, aMsg, L"CasCade Error", MB_ICONERROR); goto Application; // restart application loop } #else // _DEBUG // By Matra nReturnCode = pApp->Run(); #endif // _DEBUG // By Matra ASSERT_VALID(pApp); InitFailure: #ifdef _DEBUG // Check for missing AfxLockTempMap calls if (AfxGetModuleThreadState()->m_nTempMapLock != 0) { TRACE1("Warning: Temp map lock count non-zero (%ld).\n", AfxGetModuleThreadState()->m_nTempMapLock); } AfxLockTempMaps(); AfxUnlockTempMaps(); #endif AfxWinTerm(); #ifdef DISPLAYCONSOLE // By Matra // ferme la console pour le cout fclose( stdout ); //hCrt = _fcloseall(); :-) rep = FreeConsole(); #endif // DISPLAYCONSOLE // By Matra return nReturnCode; } /////////////////////////////////////////////////////////////////////////////
在中国程序员是青春饭吗?
今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...
《MySQL 性能优化》之理解 MySQL 体系结构
本文介绍 MySQL 的体系结构,包括物理结构、逻辑结构以及插件式存储引擎。
程序员请照顾好自己,周末病魔差点一套带走我。
程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。
复习一周,京东+百度一面,不小心都拿了Offer
京东和百度一面都问了啥,面试官百般刁难,可惜我全会。
Java 14 都快来了,为什么还有这么多人固守Java 8?
从Java 9开始,Java版本的发布就让人眼花缭乱了。每隔6个月,都会冒出一个新版本出来,Java 10 , Java 11, Java 12, Java 13, 到2020年3月份,...
达摩院十大科技趋势发布:2020 非同小可!
【CSDN编者按】1月2日,阿里巴巴发布《达摩院2020十大科技趋势》,十大科技趋势分别是:人工智能从感知智能向认知智能演进;计算存储一体化突破AI算力瓶颈;工业互联网的超融合;机器间大规模协作成为可能;模块化降低芯片设计门槛;规模化生产级区块链应用将走入大众;量子计算进入攻坚期;新材料推动半导体器件革新;保护数据隐私的AI技术将加速落地;云成为IT技术创新的中心 。 新的画卷,正在徐徐展开。...
轻松搭建基于 SpringBoot + Vue 的 Web 商城应用
首先介绍下在本文出现的几个比较重要的概念: 函数计算(Function Compute): 函数计算是一个事件驱动的服务,通过函数计算,用户无需管理服务器等运行情况,只需编写代码并上传。函数计算准备计算资源,并以弹性伸缩的方式运行用户代码,而用户只需根据实际代码运行所消耗的资源进行付费。Fun: Fun 是一个用于支持 Serverless 应用部署的工具,能帮助您便捷地管理函数计算、API ...
讲真,这两个IDE插件,可以让你写出质量杠杠的代码
周末躺在床上看《拯救大兵瑞恩》 周末在闲逛的时候,发现了两个优秀的 IDE 插件,据说可以提高代码的质量,我就安装了一下,试了试以后发现,确实很不错,就推荐给大家。 01、Alibaba Java 代码规范插件 《阿里巴巴 Java 开发手册》,相信大家都不会感到陌生,其 IDEA 插件的下载次数据说达到了 80 万次,我今天又贡献了一次。嘿嘿。 该项目的插件地址: https://github....
Python+OpenCV实时图像处理
目录 1、导入库文件 2、设计GUI 3、调用摄像头 4、实时图像处理 4.1、阈值二值化 4.2、边缘检测 4.3、轮廓检测 4.4、高斯滤波 4.5、色彩转换 4.6、调节对比度 5、退出系统 初学OpenCV图像处理的小伙伴肯定对什么高斯函数、滤波处理、阈值二值化等特性非常头疼,这里给各位分享一个小项目,可通过摄像头实时动态查看各类图像处理的特点,也可对各位调参、测试...
2020年一线城市程序员工资大调查
人才需求 一线城市共发布岗位38115个,招聘120827人。 其中 beijing 22805 guangzhou 25081 shanghai 39614 shenzhen 33327 工资分布 2020年中国一线城市程序员的平均工资为16285元,工资中位数为14583元,其中95%的人的工资位于5000到20000元之间。 和往年数据比较: yea...
为什么猝死的都是程序员,基本上不见产品经理猝死呢?
相信大家时不时听到程序员猝死的消息,但是基本上听不到产品经理猝死的消息,这是为什么呢? 我们先百度搜一下:程序员猝死,出现将近700多万条搜索结果: 搜索一下:产品经理猝死,只有400万条的搜索结果,从搜索结果数量上来看,程序员猝死的搜索结果就比产品经理猝死的搜索结果高了一倍,而且从下图可以看到,首页里面的五条搜索结果,其实只有两条才是符合条件。 所以程序员猝死的概率真的比产品经理大,并不是错...
害怕面试被问HashMap?这一篇就搞定了!
声明:本文以jdk1.8为主! 搞定HashMap 作为一个Java从业者,面试的时候肯定会被问到过HashMap,因为对于HashMap来说,可以说是Java集合中的精髓了,如果你觉得自己对它掌握的还不够好,我想今天这篇文章会非常适合你,至少,看了今天这篇文章,以后不怕面试被问HashMap了 其实在我学习HashMap的过程中,我个人觉得HashMap还是挺复杂的,如果真的想把它搞得明明白...
毕业5年,我问遍了身边的大佬,总结了他们的学习方法
我问了身边10个大佬,总结了他们的学习方法,原来成功都是有迹可循的。
python爬取百部电影数据,我分析出了一个残酷的真相
2019年就这么匆匆过去了,就在前几天国家电影局发布了2019年中国电影市场数据,数据显示去年总票房为642.66亿元,同比增长5.4%;国产电影总票房411.75亿元,同比增长8.65%,市场占比 64.07%;城市院线观影人次17.27亿,同比增长0.64%。 看上去似乎是一片大好对不对?不过作为一名严谨求实的数据分析师,我从官方数据中看出了一点端倪:国产票房增幅都已经高达8.65%了,为什...
推荐10个堪称神器的学习网站
每天都会收到很多读者的私信,问我:“二哥,有什么推荐的学习网站吗?最近很浮躁,手头的一些网站都看烦了,想看看二哥这里有什么新鲜货。” 今天一早做了个恶梦,梦到被老板辞退了。虽然说在我们公司,只有我辞退老板的份,没有老板辞退我这一说,但是还是被吓得 4 点多都起来了。(主要是因为我掌握着公司所有的核心源码,哈哈哈) 既然 4 点多起来,就得好好利用起来。于是我就挑选了 10 个堪称神器的学习网站,推...
这些软件太强了,Windows必装!尤其程序员!
Windows可谓是大多数人的生产力工具,集娱乐办公于一体,虽然在程序员这个群体中都说苹果是信仰,但是大部分不都是从Windows过来的,而且现在依然有很多的程序员用Windows。 所以,今天我就把我私藏的Windows必装的软件分享给大家,如果有一个你没有用过甚至没有听过,那你就赚了????,这可都是提升你幸福感的高效率生产力工具哦! 走起!???? NO、1 ScreenToGif 屏幕,摄像头和白板...
阿里面试,面试官没想到一个ArrayList,我都能跟他扯半小时
我是真的没想到,面试官会这样问我ArrayList。
曾经优秀的人,怎么就突然不优秀了。
职场上有很多辛酸事,很多合伙人出局的故事,很多技术骨干被裁员的故事。说来模板都类似,曾经是名校毕业,曾经是优秀员工,曾经被领导表扬,曾经业绩突出,然而突然有一天,因为种种原因,被裁员了,...
大学四年因为知道了这32个网站,我成了别人眼中的大神!
依稀记得,毕业那天,我们导员发给我毕业证的时候对我说“你可是咱们系的风云人物啊”,哎呀,别提当时多开心啦????,嗯,我们导员是所有导员中最帅的一个,真的???? 不过,导员说的是实话,很多人都叫我大神的,为啥,因为我知道这32个网站啊,你说强不强????,这次是绝对的干货,看好啦,走起来! PS:每个网站都是学计算机混互联网必须知道的,真的牛杯,我就不过多介绍了,大家自行探索,觉得没用的,尽管留言吐槽吧???? 社...
良心推荐,我珍藏的一些Chrome插件
上次搬家的时候,发了一个朋友圈,附带的照片中不小心暴露了自己的 Chrome 浏览器插件之多,于是就有小伙伴评论说分享一下我觉得还不错的浏览器插件。 我下面就把我日常工作和学习中经常用到的一些 Chrome 浏览器插件分享给大家,随便一个都能提高你的“生活品质”和工作效率。 Markdown Here Markdown Here 可以让你更愉快的写邮件,由于支持 Markdown 直接转电子邮...
看完这篇HTTP,跟面试官扯皮就没问题了
我是一名程序员,我的主要编程语言是 Java,我更是一名 Web 开发人员,所以我必须要了解 HTTP,所以本篇文章就来带你从 HTTP 入门到进阶,看完让你有一种恍然大悟、醍醐灌顶的感觉。 最初在有网络之前,我们的电脑都是单机的,单机系统是孤立的,我还记得 05 年前那会儿家里有个电脑,想打电脑游戏还得两个人在一个电脑上玩儿,及其不方便。我就想为什么家里人不让上网,我的同学 xxx 家里有网,每...
2020 年,大火的 Python 和 JavaScript 是否会被取而代之?
Python 和 JavaScript 是目前最火的两大编程语言,但是2020 年,什么编程语言将会取而代之呢? 作者 |Richard Kenneth Eng 译者 |明明如月,责编 | 郭芮 出品 | CSDN(ID:CSDNnews) 以下为译文: Python 和 JavaScript 是目前最火的两大编程语言。然而,他们不可能永远屹立不倒。最终,必将像其他编程语言一...
史上最全的IDEA快捷键总结
现在Idea成了主流开发工具,这篇博客对其使用的快捷键做了总结,希望对大家的开发工作有所帮助。
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
谁是华为扫地僧?
是的,华为也有扫地僧!2020年2月11-12日,“养在深闺人不知”的华为2012实验室扫地僧们,将在华为开发者大会2020(Cloud)上,和大家见面。到时,你可以和扫地僧们,吃一个洋...
Idea 中最常用的10款插件(提高开发效率),一定要学会使用!
学习使用一些插件,可以提高开发效率。对于我们开发人员很有帮助。这篇博客介绍了开发中使用的插件。
AI 没让人类失业,搞 AI 的人先失业了
最近和几个 AI 领域的大佬闲聊 根据他们讲的消息和段子 改编出下面这个故事 如有雷同 都是巧合 1. 老王创业失败,被限制高消费 “这里写我跑路的消息实在太夸张了。” 王葱葱哼笑一下,把消息分享给群里。 阿杰也看了消息,笑了笑。在座几位也都笑了。 王葱葱是个有名的人物,21岁那年以全额奖学金进入 KMU 攻读人工智能博士,累计发表论文 40 余篇,个人技术博客更是成为深度学习领域内风向标。 ...
2020年,冯唐49岁:我给20、30岁IT职场年轻人的建议
点击“技术领导力”关注∆每天早上8:30推送 作者|Mr.K 编辑| Emma 来源|技术领导力(ID:jishulingdaoli) 前天的推文《冯唐:职场人35岁以后,方法论比经验重要》,收到了不少读者的反馈,觉得挺受启发。其实,冯唐写了不少关于职场方面的文章,都挺不错的。可惜大家只记住了“春风十里不如你”、“如何避免成为油腻腻的中年人”等不那么正经的文章。 本文整理了冯...
作为一名大学生,如何在B站上快乐的学习?
B站是个宝,谁用谁知道???? 作为一名大学生,你必须掌握的一项能力就是自学能力,很多看起来很牛X的人,你可以了解下,人家私底下一定是花大量的时间自学的,你可能会说,我也想学习啊,可是嘞,该学习啥嘞,不怕告诉你,互联网时代,最不缺的就是学习资源,最宝贵的是啥? 你可能会说是时间,不,不是时间,而是你的注意力,懂了吧! 那么,你说学习资源多,我咋不知道,那今天我就告诉你一个你必须知道的学习的地方,人称...
那些年,我们信了课本里的那些鬼话
教材永远都是有错误的,从小学到大学,我们不断的学习了很多错误知识。 斑羚飞渡 在我们学习的很多小学课文里,有很多是错误文章,或者说是假课文。像《斑羚飞渡》: 随着镰刀头羊的那声吼叫,整个斑羚群迅速分成两拨,老年斑羚为一拨,年轻斑羚为一拨。 就在这时,我看见,从那拨老斑羚里走出一只公斑羚来。公斑羚朝那拨年轻斑羚示意性地咩了一声,一只半大的斑羚应声走了出来。一老一少走到伤心崖,后退了几步,突...
立即提问