"operator char*" issue
<p>Below code expected to print "kevin"
But, it's printing garbage value. I have checked in debugger. The pointer returned by "operator char*" call is invalid.  Any idea?</p>

<pre><code>class Wrapper
{
private:
    char* _data;

public:

    Wrapper(const char* input)
    {
        int length = strlen(input) + 1;
        _data = new char[length];
        strcpy_s(_data, length, input);
    }

    ~Wrapper()
    {
        delete[] _data;
    }

    operator char*()
    {
        return _data;
    }
};

int main()
{
    char* username = Wrapper("kevin");
    printf(username);
    return 0;
}
</code></pre>
