Expected initializer before void in function......

You need to have a semicolon at the end of each expression.

byte myvar;  // semicolon needed here
void setup()
{
  myvar = 10;   // and here
    Serial.begin (9600);
}
void loop()
{
  if (10 == HIGH)  
  {
    Serial.println (myvar);
  }
}

This code will compile but wont print anything because
if (10 == HIGH)
will never be true, what did you want to do here?