856 Subj : , expected To : borland.public.cpp.borlandcpp From : john blackburn Date : Mon Apr 19 2004 12:43 pm I am trying to compile the following unit but am getting an E2257 , expected error. In the past when I got this, it was because one of the class declarations was missing a terminating ; However I can't see what the problem is here. I am compiling it alone by pressing ALT+ and hopefully, this means that only headerfiles called in the units own header are involved; however, please correct me if I am wrong. Code as follows (only a tiny unit) - (the error occurs at the typedef statement in the last method) :- //--------------------------------------------------------------------------- #ifndef symbolsH #define symbolsH //--------------------------------------------------------------------------- #include #include #include class symboltable { private: std::map symbols; public: bool addtosymbols(const std::string key, const int value); void printsymbols(std::ostream& liststream); }; #endif //--------------------------------------------------------------------------- #pragma hdrstop #include "symbols.h" //--------------------------------------------------------------------------- #pragma package(smart_init) bool symboltable::addtosymbols(const std::string key, const int value) { if (symbols.find(key) != symbols.end()) return false; else { symbols[key] = value; return true; } } //--------------------------------------------------------------------------- void symboltable::printsymbols(std::ostream& liststream) { typedef map::const_iterator SI; for (SI s=symbols.begin(); s!=symbols.end(); ++s) { liststream << s->first << oct << s->second; } } //--------------------------------------------------------------------------- I can comment out all statements in the method implementations except for the typedef and the error still occurs. Thanks for looking at this John . 0