#include NewsItem &NewsItem::operator=(const String &pathFileName) { (Header&)*this=pathFileName; this->pathFileName(pathFileName); *this=(Header&)*this; return *this; } NewsItem &NewsItem::operator=(const Header &someHeader) { String strName(subject()); char *ptrString; String partString(subject().betweenString('(',')')); if(partString.isNull())return *this; ptrString=(LPSTR)partString; ptrString=::strtok(ptrString,"/"); if(!ptrString)return *this; part(::atoi(ptrString)); ptrString=::strtok(0,"\0"); if(!ptrString)return *this; parts(::atoi(ptrString)); partString=subject(); ptrString=(LPSTR)partString+partString.length(); while(*ptrString!='('&&ptrString>(LPSTR)partString)ptrString--; if(ptrString==(LPSTR)partString&&*ptrString!='(')return *this; *(--ptrString)=0; while(*ptrString!=' '&&ptrString>(LPSTR)partString)ptrString--; if(ptrString==(LPSTR)partString&&*ptrString!=' ')return *this; ptrString++; name(ptrString); return *this; }