class MainWindow : public QWidget{ Q_OBJECTpublic: MainWindow();private: static QMap<QString, QString>::iterator beginIterator; static QMap<QString, QString>::iterator endIterator;};
MainWindow::MainWindow(){ connect(this, SIGNAL(transferIteratorsOnMapSignal(QMap<QString, QString>::iterator, QMap<QString, QString>::iterator)), this, SLOT(comparisonWordsSlot(QMap<QString,QString>::iterator, QMap<QString,QString>::iterator)));}void MainWindow::initialIteratorsForMap(){ setLanguageSlot(currentItemCombo); if(currentItemCombo == 0) emit transferIteratorsOnMapSignal(beginIterator = dictionaryNohRus.begin(), endIterator = dictionaryNohRus.end()); else if(currentItemCombo == 1) emit transferIteratorsOnMapSignal(beginIterator = dictionaryRusNoh.begin(), endIterator = dictionaryRusNoh.end());}
In function `MainWindow::initialIteratorsForMap()':ошибка: undefined reference to `MainWindow::endIterator'ошибка: undefined reference to `MainWindow::beginIterator'
C++ (Qt) MainWindow::beginIterator;MainWindow::endIterator; MainWindow::MainWindow(){ connect(this, SIGNAL(transferIteratorsOnMapSignal(QMap<QString, QString>::iterator, QMap<QString, QString>::iterator)), this, SLOT(comparisonWordsSlot(QMap<QString,QString>::iterator, QMap<QString,QString>::iterator)));} void MainWindow::initialIteratorsForMap(){ setLanguageSlot(currentItemCombo); if(currentItemCombo == 0) emit transferIteratorsOnMapSignal(beginIterator = dictionaryNohRus.begin(), endIterator = dictionaryNohRus.end()); else if(currentItemCombo == 1) emit transferIteratorsOnMapSignal(beginIterator = dictionaryRusNoh.begin(), endIterator = dictionaryRusNoh.end());}
C++ (Qt)connect(this, SIGNAL(transferIteratorsOnMapSignal(QMap<QString, QString>::iterator, QMap<QString, QString>::iterator)), this, SLOT(comparisonWordsSlot(QMap<QString,QString>::iterator, QMap<QString,QString>::iterator)));
C++ (Qt)typedef QMap <QString, QString> TStrMap;struct СStrMapLookup { СStrMapLookup( TStrMap & _map ) : mMap(_map), mBeg(_map.begin()), mEnd(_map.end()) {} QString * GetCur( void ) { return (mBeg == mEnd) ? 0 : &mBeg.value(); } QString * GetNxt( void ) { if (mBeg != mEnd) ++mBeg; return GetCur(); } // data TStrMap & mMap; TStrMap::iterator mBeg, mEnd;};