+ 1
Can we do like that in C++
(t1->data <= t2->data) ? (list=t1 && t1=t1->next) : (list=t2 && t2=t2->next); A ternary operation in which I wanted to do two task simultaneously with logical AND operator (&&). Here t1, t2, list are pointers of a structure node type. And the structure of node is: struct Node { int data; struct Node *next; }
1 Réponse
0
you most certainly can do this