Tuesday, August 5, 2008

enums and namespaces

In standard C++, enumeration constants are accessible
within the scope that contains the enum. The enum itself
does not define a scope.

class CTopicBuilder
{
public:
enum SearchFileType
{
FileTypeSource,
FileTypeTopic
};
}

So the valid syntax to access enum is CTopicBuilder::FileTypeSource

No comments: