For enums within a class...
Incorrect :
class MyClass{
public:
enum kHTTPMethods {GET,PUT,POST}
};
void MyClass::Func(){
kHTTPMethods method = kHTTPMethod.GET;
}
1) Am I right to say this does not work because . operator can only be use on objects (instances) of a class?
Correct:
void MyClass::Func(){
kHTTPMethods method = GET;
}
2) Am I right to say this is correct because all the elements of the class becomes globally scoped within the class?