Im using an Arduino Mega and the FastLED library. I have a working code to control my matrix, which is my only display right now, but i am trying to create another code to make it easier to add more displays in the future like a star or for the outline of the house. I figured i have to use a class even though i dont have experience using classes. I cant even test my code with my matrix because it wont compile. I get the error message "no matching function for call to 'CFastLED::addLeds(CRGB [(((sizetype)(((ssizetype)NumberOfLEDs) + -1)) + 1)], int)' ". It's complaining about this line in the class Group ' FastLED.addLeds<WS2811,3,RGB>(_SerialInput,300);' When i move this line to setup() function, the code compiles but will not compile in the class Group. Is what im trying to do even possibe or am i missing something obvious. The code is below and i know its messy. Been moving everything around to get it compiled
FYI Im not a strong programmer

#include <FastLED.h>

//#define ColourOrder RGB
//#define LEDtype WS2811

char Header[] = "VIXStart";
char FirstSerialInput[sizeof(Header)-1];

const int RGBstripPin= 3;
const int NumberOfLights=300;
const int NumberOfLEDs=(NumberOfLights*3);

int rgb[3];
CRGB SerialInputForRGBstrip_Light[NumberOfLEDs];
CRGB _SerialInput[NumberOfLEDs];

//------------------------------------------------------------------------------------------------

class Group
{

private: enum _Chipset {WS2811,WS2812};
enum _ColourOrder{RGB,RBG,GBR,GRB,BGR,BRG};
_Chipset _Chip;
_ColourOrder _Colour;

public:
Group(_Chipset chip ,_ColourOrder colour)
{
_Chip= chip;
_Colour= colour;
}
void Group2(int Pin,int NumberOfLEDs)
{
CRGB _SerialInput[NumberOfLEDs];
FastLED.addLeds<WS2811,3,RGB>(_SerialInput,300);

}

void CollectSerialInput(int Lights,int rgb[],CRGB SerialInput[])
{
for( int i=0;i<Lights;i++)
{
for( int x=0;x<3;x++)
{
while (Serial.available() ==0) // Wait for bytes to be received
{
//delay(10);
}

rgb[x] = Serial.read();
}

SerialInput[i].r=rgb[0];
SerialInput[i].g=rgb[1];
SerialInput[i].b=rgb[2];
}

}


};


//--------------------------------------------------------------------------------------------------------------------
void HeaderCheck()
{
for(unsigned int i=0;i<(sizeof(Header)-1);i++)
{
while(Serial.available()==0);
do{
FirstSerialInput[i]=Serial.read();

}while(FirstSerialInput[i]!=Header[i]);
}
}

//--------------------------------------------------------------------------------------------------------------------


void setup()
{
delay(100);
//pinMode( RGBstripPin,OUTPUT); // .addLeds function doesn't like it
//FastLED.addLeds<LEDtype,RGBstripPin,ColourOrder>(S erialInputForRGBstrip_Light,9);//SerialInputForRGBstrip_Light cannot be a double array because

Serial.begin(230400);
}

//Group Matrix(WS2811,RGB);
//Group Star ( LEDtype,RGBstripPin, ColourOrder, SerialInputForRGBstrip_Light,NumberOfLEDs);
//Group HouseOutline(RGBstripPin,LEDtype,ColourOrder,Seria lInputForRGBstrip_Light,NumberOfLEDs);


void loop()
{


HeaderCheck();

//Matrix.CollectSerialInput(NumberOfLights,rgb,Seria lInputForRGBstrip_Light);
//Star.CollectSerialInput(NumberOfLights,rgb,SerialI nputForRGBstrip_Light);
//HouseOutline.CollectSerialInput(NumberOfLights,rgb ,SerialInputForRGBstrip_Light);

FastLED.show();


}