View Single Post
Old 02-04-2007   #8
jadm
Registered Member
 
jadm's Avatar
 
Last Online: 07-21-2009
Join Date: Jan 2007
Posts: 138
Thanks: 60
Thanked 22 Times in 21 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Default Re: plzzz i need help in c++

// n = longueur du premiere liste;
// m = longueur de deuxieme liste;
// l = longueur du troisieme liste;
//head = tab3oul l premiere liste;
// head 1 = tab3oul l deuxieme liste;
// head 2 = 3 =eme liste;
node *create2(node*head2,node*head1,node*head,int n,int m){
int l,i;
node * cur=head;
node*cur1=head1;
node*tmp;
node*last;
last=new node;

last->data=cur->data+cur1->data;

head2=last;
if (m>=n)
l=m;
if (n>m)
l=n; /// pour savoir la longueur du troisieme liste
for(i=0;i<l;i++){
tmp=new node;

cur=cur->next;
cur1=cur1->next;
tmp->data=cur1->data+cur->data;
last->next=tmp;
last=tmp;
}
last->next=NULL;
return head2;
}

if anyone could tell me where is the problem bkoun mamnounnnnnnn 3am bi 7hotile the prog has encountered a problem and needs to close. We are sorry for the inconvenience. debug or close .... so ya3ne fi mashkal bil prog bass ma 3am ba3rif shou houwe
jadm is offline   Reply With Quote