Converting operator in enum
<p>I wrote class like this:</p>

<pre><code>#pragma once
#include "stdafx.h"

struct Date
{
private:
int day;
int year;
enum Month {jan = 1,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec};
Month* month;
enum date_state 
{
 good,err_flag, bad_day, bad_month, bad_year,
};
//I would like to define converting operator from enum to char
Date::date_state::operator char()
{
 return err_flag;
}
date_state err_state;
void clear(date_state state = good);
date_state rdstate() const;
void check_day(const int d)const;
void check_month()const;
void check_year()const;
public:
Date(const int d,const Date::Month&amp; m, const int y);

};
</code></pre>

<p>and basically it doesn't work. 
Thank you for any help with this problem.</p>
