error: expected unqualified-id before 'void' c++ error code example
Example: expected unqualified-id before 'if'
void loop(){
if(distanceCm < 21){
digitalWrite(13, HIGH);
}
else{
digitalWrite(13, LOW);
}
}
void loop(){
if(distanceCm < 21){
digitalWrite(13, HIGH);
}
else{
digitalWrite(13, LOW);
}
}