Subj : std streams and enum? To : dev-cpp-users@lists.sourceforge.net From : Maya Date : Sun Dec 21 2003 05:32 pm Can someone please help me? I am using an enum type that I want to store in a std::IOStream object, but the compiler [complainer] tells me that the format is not supported. enum types are the same as 'const int' right? So, there should not be a problem! namespace jme{ enum account_t {Zero, One, Two}; class Account{ protected: account_t type; .... public: friend std::istream& jme::operator>>(std::istream& is, jme::Account& obj){ is >> obj.type; // <<======== Here is the problem **** return is; } }; } This gives me an error that reads: ==================================================== account.H: In function `std::istream& jme::operator>>(std::istream&, jme::Account&)': account.H:91: no match for `std::basic_istream >& >> jme::account_t&' operator <<<<<<<====== This is the problem ***** ....: candidates are: /* Gives me a list of other candidates */ ==================================================== Thanks in advance -- FYI http://www.astro.umd.edu/~marshall/abbrev.html E-Mail Policy http://www.vif.com/users/escalante/Email_Policy.html * You cannot exercise your power to a point of humiliation. - Jean Chretien * The media's the most powerful entity on earth. They have the power to make the innocent guilty and to make the guilty innocent, and that's power. - Malcom X * "Innocent until proven guilty", no... not in Canada!! .