首页 新闻 搜索 专区 学院

curvedeque中定义了私有成员变量deque<Edge*>m_Edges,在类的成员函数中对变量践行赋值调试时直接跳出来了

0
悬赏园豆:5 [待解决问题]

void curvedeque::AddEdges(vector<Edge*>edge)
{
for (int i=0;i<edge.size();i++)//初始化第一条曲线
{
if (edge[i]!=NULL)
{
m_Edges.push_front(edge[i]);
Point3d a(0.0,0.0,0.0);
Point3d b(0.0,0.0,0.0);
edge[i]->GetVertices (&a, &b);
SetStartPoint(&a);
SetEndPoint(&b);
edge[i]=NULL;
break;
}
}

 1 void curvedeque::AddEdges(vector<Edge*>edge)
 2 {
 3     for (int i=0;i<edge.size();i++)
 4     {
 5         if (edge[i]!=NULL)
 6         {
 7             m_Edges.push_front(edge[i]);
 8             Point3d a(0.0,0.0,0.0);
 9             Point3d b(0.0,0.0,0.0);
10             edge[i]->GetVertices (&a, &b);
11             SetStartPoint(&a);
12             SetEndPoint(&b);
13             edge[i]=NULL;
14             break;
15         }
16     }
17 }

在执行到 m_Edges.push_front(edge[i]);这句话的时候就跳出调试了。

linyangyang的主页 linyangyang | 初学一级 | 园豆:197
提问于:2015-09-28 21:09
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册