A few days ago I found a totally new syntax like
auto ClassName::functionName() -> something.
what do you think? is there any problem?
Actually there is a problem. The enum Type declared inside the Class and when we will try to define the function outside the class, compiler will not found the Type there. In this case
will cause an error.
Now there is a solution to avoid this error is to define the function inside the class. But what if you we don’t want to do that. How can we define such functions outside the class?
here comes the syntax We talked about.
This is the feature of C++11.
in our case our function will be
auto Problem::getType() -> Type