Is it possible to return an object from a static method in C++ like there is in Java? I am doing this:
class MyMath { public: static MyObject calc
What am I doing wrong?
You are simply using incorrect syntax... the :: operator (scope resolution operator) is how you would access classes or members in different namespaces:
::
int main() { MyObject o = MyMath::calcSomething(); // correct syntax }
Do I have to instantiate MyMath?
No.