Kornel Benko <[EMAIL PROTECTED]> writes: | On Saturday, 6. April 2002 13:14, Lars Gullik Bjønnes wrote: | ... >> I bet this is the culprit: > | This did it.
Can you try this variant as well? istream & operator>>(istream & is, lyxstring & s) { #if 0 // very bad solution char * nome = new char[1024]; is >> nome; lyxstring tmp(nome); delete [] nome; if (!tmp.empty()) s = tmp; #else // better solution int w = is.width(0); s.clear(); int c = 0; while ((c = is.get()) != istream::traits_type::eof()) { if (isspace(c)) { is.putback(c); break; } s += char(c); if (--w == 1) break; } if (s.empty()) is.setstate(std::ios::failbit); #endif return is; } -- Lgb