Help with the LiquidCrystal Class

Hey guys

I’m trying to use two LiquidCrystal objects in another class, and I can’t figure out what’s wrong with the code, I attached the code, as well as the full error trace.

//Main
#include "test.h"
#include <LiquidCrystal.h>
LiquidCrystal lcd(12,10,5,4,3,2);
LiquidCrystal lcd2(12,10,5,4,3,2);
Display2 dd(&lcd,&lcd2);

void setup() {
}
  
//--------------------------MAIN----------------------------------------

void loop() {
  
  

}
//test.h
#include <Arduino.h>
#include <LiquidCrystal.h>


class Display2{

private:
LiquidCrystal* lcd;
LiquidCrystal* lcd2;

public:
Display2(LiquidCrystal* aLCD,LiquidCrystal* bLCD) : lcd(aLCD), lcd2(bLCD)
{}

void show(int display_code);
};
//test.cpp
#include <Arduino.h>
#include "test.h"
#include <LiquidCrystal.h>

Display2(LiquidCrystal* aLCD, LiquidCrystal* bLCD) : lcd(aLCD), lcd2(bLCD)
{
    lcd->begin(16,2);
    lcd2->begin(16,2);
  }

void Display2 :: show(int display_code){
      if(display_code = 0){
          lcd->print("Boot Test1");
          lcd2->print("Boot Test2");
        
          lcd->clear();
          lcd2->clear();
 
          lcd->print("Ready");
          lcd2->print("Ready");
 
          lcd->clear();
          lcd2->clear();
          
      }
      else if(display_code = 1){
        
      }
      else if(display_code = 2){
        
      }
      else if(display_code = 3){
        
      }
  }
}

Full error trace

test.cpp:5:23: error: expected ')' before '*' token

 Display2(LiquidCrystal* aLCD, LiquidCrystal* bLCD) : lcd(aLCD), lcd2(bLCD)

                       ^

test.cpp:36:1: error: expected declaration before '}' token

 }

 ^

exit status 1
expected ')' before '*' token

You've defined your Display2 constructor code twice - once in the .h file and once (incorrectly, no scope specifier) in the .cpp file. Choose one. Might be other mistakes, but fix that first.

yes he is correct