Error "expected initializer before '<=' token" with If and For conditions

Hello everybody!

I wrote a code for my homemade giant LED Clock but I get an error while compiling

_P421_LEDClock:233: error: expected initializer before '<=' token

Here is the portion of code (just the conditions that cause problems and the variables needed to run these conditions, it is not necessary that I post the 900 lines of the entire code) :

Variables :

int LEDdigit0[21]  = { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 };
int LEDdigit1[21] = { 21,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41 };
int LEDdotpoint[2]    = { 42,43 };
int LEDdigit2[21] = { 44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64 };
int LEDdigit3[21] = { 65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85 };

int digit = 0;

Function :

void printDigit       // Préparation des numéros de LED pour le bon digit
{
  int LEDid[21];

  if(digit == 0)
  {
    for(int i = 0, i <= 20, i++)
    {
      LEDid[i] = LEDdigit0[i];
    }
  }
  if(digit == 1)
  {
    for(int i = 0, i <= 20, i++)
    {
      LEDid[i] = LEDdigit1[i];
    }
  }
  if(digit == 2)
  {
    for(int i = 0, i <= 20, i++)
    {
      LEDid[i] = LEDdigit2[i];
    }
  }
  if(digit == 3)
  {
    for(int i = 0, i <= 20, i++)
    {
      LEDid[i] = LEDdigit3[i];
    }
  }
}

Thanks and good evening to all!
Waryard

for(int i = 0, i <= 20, i++)Right there.
Check for loop syntax

It looks to me like a 2D array would offer much simplified code.

AWOL:

for(int i = 0, i <= 20, i++)

Right there.
Check for loop syntax

It looks to me like a 2D array would offer much simplified code.

Oh, some stupid bad habits...

Usually I use SublimeText who write the whole For line so I rarely have to type the syntax myself

Goodbye For loops,

int LEDid[4][21] =
{ 
 { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 },
 { 21,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41 },
 { 44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64 },
 { 65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85 }
};

will do the job perfectly

Thank you AWOL!

Goodbye For loops

That's a pretty dumb attitude, because you usually use some program to think for you.