Hi,
I'm beginner in Arduino and after making a program for my school project I tried to make it look a little bit more in order.
So I tried to create different functions by typing :
void "name of funcion"(){
...
}
and to use this function in my program by typing :
name of function();
and I'm getting this error of compilation :
invalid operands of types 'void()' and 'void' to binary 'operator-'
I don't know what am I supposed to put between () or is at another thing ?
PS: I'm not english, that's why it can look a little bit strangely write
You can't use the '-' in the name of a function. Function names can only be letters and numbers (and I believe have to start with a letter). They can also have the underscore '_'
Hyphens are not legal in function or variable names. The compiler thinks you're trying to perform a subtraction.
Variable and function names are only allowed to have letters, numbers, and the underscore (_) in them, and must not have a number as their first character.