السلام عليكم ورحمه الله وبركاته
عندي سؤال عن الـ Graph
في فنكشن عندي فيها مشكله وأتمنى أحد يساعدني بمعرفتها وفهم الخطأ
void insertArc (Graph<station,int> &g)
{
int k1,k2;
/*station s1,s2;
do{
cout<<" enter the ID of station move from it \n";
cin>>k1;
}while(! g.retrieveVertex(k1,s1)=1);
do{
cout<<" enter the ID of station arrive to it \n";
cin>>k2;
}while(! g.retrieveVertex(k2,s2)=1);*/
cout<<" enter the ID of station move from it \n";
cin>>k1;
cout<<" enter the ID of station arrive to it \n";
cin>>k2;
if (g.insertArc(k1,k2)=1)
cout<<"sucess insert \n";
else
if (g.insertArc(k1,k2)=-1)
cout<<" cann't insert memory over fllow \n";
else
if (g.insertArc(k1,k2)=-2)
cout<<"ID of station move from it not found \n";
else
if (g.insertArc(k1,k2)=-3)
cout<<"ID of station arrive to it not found \n";
}الخطأ دائما ً يطلع لي في السطور مثل
if (g.insertArc(k1,k2)=-2)
لما اسوي مساواة لفنكشن بقيمه
مـآ الخطأ
جزاكم الله خيرا ً
