Code errors

I get the following error while compile this code:

----------------------------code-------------------------------

/*
vasilis

19/3/2020

*/

// constants
const int led = 39;
const int ledd = 41;
const int button = 49;
// variables
int buttonState;

// initialize constants and variables
void setup() {
pinMode(led,OUTPUT);
pinMode(ledd,OUTPUT);
pinMode(button,INPUT);
digitalWrite (ledd, LOW);
}

// main program
void loop() {
buttonState = digitalRead(button);
if (buttonState ** HIGH) {
digitalWrite(ledd, HIGH);
}
else {
digitalWrite(ledd, LOW);

}
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(2000); // wait for a second
}

------------------------------------end of code------------------------------------------------

the error :


Arduino: 1.8.12 (Windows 7), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from sketch\BlinkMega2560.ino.cpp:1:0:

G:\Apothiki (E) toy HDD_C\APOTHIKI\Documents\Arduino\BlinkMega2560\BlinkMega2560.ino: In function 'void loop()':

C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:40:14: error: invalid type argument of unary '*' (have 'int')

#define HIGH 0x1

^

G:\Apothiki (E) toy HDD_C\APOTHIKI\Documents\Arduino\BlinkMega2560\BlinkMega2560.ino:25:22: note: in expansion of macro 'HIGH'

if (buttonState ** HIGH) {

^~~~

exit status 1
Error compiling for board Arduino Mega or Mega 2560.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


I cannot understand what is wrong !
Please i need an answer , i am beginner ...

Vasilis V.

Use "==" where you currently have "**"

Or, more simply

    digitalWrite(ledd, digitalRead (button));

instead of the whole "if" block.

Thank you ... very much !! I am very happy !! You are right the correct equal symbol for logical state high is "==".

Thank's !!

TheMemberFormerlyKnownAsAWOL:
Use "==" where you currently have "**"

Or, more simply

    digitalWrite(ledd, digitalRead (button));

instead of the whole "if" block.

instead of the whole "if-else" block including this line: buttonState = digitalRead(button);?

Smart idea !! Thank you ... 8)