I am trying to call a static method from a.h to b.cpp. from what I have researched, it is as simple as just putting a :: scope resolution but however I tried and it throws me an error "C++ requires a type specifier for all declarations". below is what I have.
a.cpp
float method() {
//some calculations inside
}
a.h
static float method();
b.cpp
a::method(); <- error! "C++ requires a type specifier for all declarations".
but if I type without the ::
a method(); <- doesn't throw any errors.
I quite confused and need guidance.