C++ (Qt)typedef int TID;typedef QHash <TID, QString> TProductHash;typedef QPair <QString, TProductHash> TVendor;typedef QHash <TID, TVendor> TVendorHash; TVendorHash vendorHash; // заполняем vendorHash из текстовика bool Lookup( TID vendorID, QString & vendorName, TID productID, QString & productName ){ TVendorHash::const_iterator itV = vendorHash.find(vendorID); if (itV == vendorHash.end()) return false; const TVendor & vendor = *itV; vendorName = vendor.first; TProductHash::const_iterator itP = vendor.second.find(productID); if (itP == vendor.second.end()) return false; productName = *itP; return true;}