Below is the JOSEPHUS round table sample codes I am studying.
The for loop expression "for(int s=m-1;s--;r=p,p=p->link);" is unusual to me. Shouldn't "r=p,p=p->link" be a conditional expression to stop the for loop?
why there is a comma "," after "r=p"? How to interpret this for loop expression?
Thanks,
L
--------------------
#include <iostream>
using namespace std;
typedef struct LNode
{
int data;
struct LNode *link;
}LNode,*LinkList;