LiquidCrystal - Trying lcd[i].print(); without success...

Hi,
Controlling several lcd screen like on this topic works good for me: http://arduino.cc/forum/index.php/topic,5014.0.html. It's fantatic!!!!
But now, I'd like to be abble to select which lcd (lcd0, lcd1, lcd2...etc), with only one variable like i, where i is from 0 to 4.

I tried the following code

#include <LiquidCrystal.h>
LiquidCrystal lcd0(22, 23, 24, 26, 28, 30);
LiquidCrystal lcd1(22, 25, 24, 26, 28, 30);
LiquidCrystal lcd2(22, 27, 24, 26, 28, 30);
LiquidCrystal lcd3(22, 29, 24, 26, 28, 30);
LiquidCrystal lcd4(22, 31, 24, 26, 28, 30);
char *LCD[5] = {"lcd0", "lcd1", "lcd2", "lcd3", "lcd4"};

void setup()
{
  
 for (int i=0; i<=4;i++)
      {
       LCD[i].begin(16,2); 
       LCD[i].clear();
       LCD[i].setCursor(0,0);
      }
}

void loop()
{
for (i=0; i<=4;i++)
      {
        LCD[i].setCursor(0,0);
        LCD[i].print("blablabla : ");
        LCD[i].print(i); 
      }
}

But the compiler reject it with " request for member 'begin' in 'LCD_', which is of non-class type 'char*'"._
Is there a way to make it ? Any clue to guide me for that? The need for this is to be abble to select the lcd number with a number in a variable.
Thanks you very much,
Lionel

char *LCD[5] = {"lcd0", "lcd1", "lcd2", "lcd3", "lcd4"};

That's an array of variable names. In the hex file that the compiler and linker combine to produce, there are no variable names.

You can create an array of LiquidCrystal instances:

LiquidCrystal lcds[] =
{
   LiquidCrystal(22, 23, 24, 26, 28, 30),
   LiquidCrystal(22, 25, 24, 26, 28, 30),
   LiquidCrystal(22, 27, 24, 26, 28, 30),
   LiquidCrystal(22, 29, 24, 26, 28, 30),
   LiquidCrystal(22, 31, 24, 26, 28, 30)
}

:sweat_smile: Thank you Paul!!!! It's beautifull!!!

Here is an example of working code.

Again thank you!!!

#include <LiquidCrystal.h>

LiquidCrystal lcds[] =
{
   LiquidCrystal(22, 23, 24, 26, 28, 30),
   LiquidCrystal(22, 25, 24, 26, 28, 30),
   LiquidCrystal(22, 27, 24, 26, 28, 30),
   LiquidCrystal(22, 29, 24, 26, 28, 30),
   LiquidCrystal(22, 31, 24, 26, 28, 30)
};

void setup()
{
  
  for (int i=0; i<=4;i++)
  {
  lcds[i].begin(16,2);
  lcds[i].setCursor(0,0);
  lcds[i].clear();
  lcds[i].print("Yess");
  lcds[i].print(i);
  }
}

void loop(){}