Invalid Conversion from 'const char' to 'char' [-fpermissive]

Hey all, I’m fairly new to coding, but have completed a couple of projects succesfully. The newest one I am working on is giving me an incredible amount of frustration. I am working on a LED light that will be put inside a cloud (made of cotton) that will randomly change the RGB value of the led based on the weather patern the arduino randomly chooses. The problem I am having is choosing the weather type and then assigning it to a variable that I can then use to modify the LED is not working properly and I have absolutely NO idea why. The excerpt of the code is as follows:

 const char *weatherDay[] = {"clearDay", "overcastDay", "rainyDay", "stormyDay"}; //The types of weather that can happen during the day.
 const char *weatherNight[] = {"clearNight", "overcastNight", "rainyNight", "stormyNight"}; //The types of weather that can happen during the night.   
 char weather = "clearDay";

void setup() 
{
 Serial.begin(9600);
}

void loop()
{
  int r = random(3);
  weather = weatherDay[r];
  Serial.print(weather);  
  delay(5000);   
}

I will have different settings for day and night, but am not as concerned with that at this time as just trying to successfuly pull a string from the weatherNight array and assign it to weather at this time.
The problem is I am getting the “warning: invalid conversion from ‘const char*’ to ‘char’ [-fpermissive]” error when trying to compile. I tried looking this up, but have no idea what it is, why I am getting it, or how to fix it. Any help would be greatly appreciated!

I changed them to strings and it worked... but i've read that strings eat up way more memory? If there is a better way to do this, I am open to suggestions!

Thanks!

Declare weather as a pointer

const char *weatherDay[] = {"clearDay", "overcastDay", "rainyDay", "stormyDay"}; //The types of weather that can happen during the day.
const char *weatherNight[] = {"clearNight", "overcastNight", "rainyNight", "stormyNight"}; //The types of weather that can happen during the night.
char * weather;

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  int r = random(4);
  weather = weatherDay[r];
  Serial.println(weather);
  delay(5000);
}

Note that there is no real need to copy to weather in the first place as you could just use the value in the array

Thanks for the help!

Just for clarification, are you suggesting something like this?

const char *weatherDay[] = {"clearDay", "overcastDay", "rainyDay", "stormyDay"}; //The types of weather that can happen during the day.
const char *weatherNight[] = {"clearNight", "overcastNight", "rainyNight", "stormyNight"}; //The types of weather that can happen during the night.

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  int r = random(4); 
  Serial.println(weatherDay[r]);
  delay(5000);
}

The only reason I had assigned the variable weather was so that I could more easily handle setting the RGB values to the light via PWM.

Something along the lines of:

int weatherConverter(char weather){
if(weather == "clearDay"){
 rLedValue = 75;
 gLedValue = 100;
 bLedValue = 255;
 }
else if.....
etc.

I just figured it would make my life easier, as I could store all different associated values (from both the weatherDay and weatherNight arrays) and then just pull them out based on the value weather was currently assigned.

I really appreciate your response, though! Thanks for taking the time to help me.

ust for clarification, are you suggesting something like this?

That would work, but now you have revealed that you need the current value of weather. You could either use that or set a variable to the array index of the current weather, let's name it currentWeather, and use the array in your comparisons. If you are using a for loop to iterate through an array until a match is found then you can use the for loop variable as the index to the weather type

Incidentally, depending on what you are doing and how the separate Day and Night arrays might be better as a single 2 dimensional array

I will definitely play around with that. Thanks so much for your input!