P
Peteroid
Using VS C++.NET 2005 Express in clr:/pure syntax. I have this enum, defined
like so:
enum My_Enum
{
ENUM_0 = 0,
ENUM_1
} ;
My_Enum enum_var ;
I'm trying to save/load enum_var to/from a file using ostream/istream. But:
output << enum_var ; //ok
input >> enum_var ; //error
So I tried saving the 'int' value of the enum vaviable:
output << int(enum_var) ; // ok
input >> enum_var ; //error
and even this doesn't work:
output << int(enum_var) ; // ok
int value ;
input >> value ; // ok
enum_var = value ; // error, can't convert?!
Help!! : )
[==P==]
like so:
enum My_Enum
{
ENUM_0 = 0,
ENUM_1
} ;
My_Enum enum_var ;
I'm trying to save/load enum_var to/from a file using ostream/istream. But:
output << enum_var ; //ok
input >> enum_var ; //error
So I tried saving the 'int' value of the enum vaviable:
output << int(enum_var) ; // ok
input >> enum_var ; //error
and even this doesn't work:
output << int(enum_var) ; // ok
int value ;
input >> value ; // ok
enum_var = value ; // error, can't convert?!
Help!! : )
[==P==]