On the first of the loop i is 0 and N is 1, therefore i<= N is true.
Therefore, enter the loop.
Now i is 1 and N is 1, therefore i<=N is true.
Therefore, enter the loop.
Now i is 2 and N is 1, therefore i<=N is false.
Therefore, exit the loop.
Avoid the extra loop cycle by using i != N rather than i <= N.
BTW: c.enterdata() inside club::writeinto() won't compile. The address of the current object is kept in the this pointer. To use the current object inside a member function you code:
this>enterdata();
