Debug Assertion Failed!求助大哥大姐们,我实在是改不出来
File:afx.inlLine:177
void CCalculator3Dlg::Onsolve()
{
// TODO: Add your control notification handler code here
CString x=m_x;
CString y=m_y;
double xx=m_xx;
double yy=0.0;
char* str=(char*)(LPCTSTR)x;
char* str1=(char*)(LPCTSTR)y;
int m=1;
int i=0;
while(x[i]==',')
{ m=m+1;
i++;
}
double *pfval=new double [m];
double *pfval1=new double [m];
int j=0;
int k=0;
const char psplit[]="[,]";
char *p=strtok(str,psplit);
char *p1=strtok(str1,psplit);
while(p!=NULL)
{
pfval[j++]=atof(p);
p=strtok(NULL,psplit);
}
while(p1!=NULL)
{
pfval1[k++]=atof(p1);
p1=strtok(NULL,psplit);
}
//for(j=0;j<=m-1;j++)
//{ return pfval[j];}
// 释放
delete[] pfval;
delete[] pfval1;
}