Scope resolution operator

I can't understand why if I build a library all its static methods have to be called using ClassName::MethodName(arg1, ...), while there are some methods (??I believe to be static??) of the Arduino environment which does not require it as for example pinMode(pin, VALUE). Is there a way to create such type of methods in self made libraries??

I can't understand why if I build a library all its static methods have to be called using ClassName::MethodName(arg1, ...), while there are some methods (??I believe to be static??) of the Arduino environment which does not require it as for example pinMode(pin, VALUE). Is there a way to create such type of methods in self made libraries??

Which class is pinMode defined in? Perhaps if you look at that "class", a clue would present itself.

Isn’t pinMode defined in the Arduino class, which is imported by default (include <Arduino.h>)? No Arduino objects are required to be declared in the sketches however… it is confusing to me, please explain it to me if you can. Why if I import mylibrary.h can’t I use the methods in it the same way I use the methods in Arduino.h??

Isn’t pinMode defined in the Arduino class, which is imported by default (include <Arduino.h>)?

Arduino isn’t a class. That was the hint that you missed.

It is possible to have header files and source files that do not contain classes.

thank you, all clear