Custom return type declarations
<p>I was hoping someone could help me with a little issue I'm having trouble understanding in c++.</p>

<p>If I create a private enum within a class in a header file (Example.h) as shown below:</p>

<pre><code>class Example
{
    private:
        enum ValueType
        {
           INTEGER,
           BOOLEAN,
           BLOB,
           UNKNOWN
        };
}
</code></pre>

<p>Then how can I access these values from a source file (private method) to be used as a return type (Example.cpp)</p>

<pre><code>#include "Example.h"

...

ValueType // &lt;-- How can I declare this correctly? compiler complains
Example::returnMyType(const ValueType p_valueType)
{
    switch(p_valueType)
    {
        case INTEGER;
        return "INTEGER";  
        break;
   ...
   ...
}
</code></pre>

<p>I'm just unsure how to declare this as the return type.</p>

<p>Also I know this function is pointless but it's only for putting across the concept I'm trying to understand.</p>

<p>I was also wondering how could I access these values from within the switch statment?</p>

<pre><code>#include "Example.h"

...

ValueType // &lt;-- How can I declare this correctly? compiler complains
Example::returnMyType(const ValueType p_valueType)
{
    switch(p_valueType)
    {
        case Example::BLOB; // &lt;-- Is this how to access 
        return "INTEGER";  
        break;
   ...
   ...
}
</code></pre>
