From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17926 invoked by alias); 23 Jan 2003 12:52:15 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 17765 invoked from network); 23 Jan 2003 12:52:14 -0000 Received: from unknown (HELO bosvwl01.infosys.com) (216.52.49.35) by 172.16.49.205 with SMTP; 23 Jan 2003 12:52:14 -0000 Received: from 192.168.200.83 by bosvwl01.infosys.com (InterScan E-Mail VirusWall NT); Thu, 23 Jan 2003 07:41:11 -0500 Received: from mohmsg01.ad.infosys.com ([192.168.122.42]) by INDHUBBHS03.ad.infosys.com with Microsoft SMTPSVC(5.0.2195.5329); Thu, 23 Jan 2003 18:24:26 +0530 X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: no matching function for call to ``vector >::at (int &) const' Date: Thu, 23 Jan 2003 12:52:00 -0000 Message-ID: <2B721C6525F0D411B1E900B0D0226BDDFD2313@mohmsg01.ad.infosys.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Ajay Bansal" To: X-OriginalArrivalTime: 23 Jan 2003 12:54:26.0511 (UTC) FILETIME=[8F74A5F0:01C2C2DE] X-SW-Source: 2003-01/txt/msg00203.txt.bz2 Hi All I am getting the following error on compiling the code /home/porting/ajay/project/Code/CObArray.h: In=20 method `T1 &CObArray::GetAt (int) const [with T1 =3D C1, T2 =3D C1 &]': /home/porting/ajay/project/Code/DbUtilities.h:575: instantiated from `C2::Find (CString &, T &) [with T =3D C1]' DbManager.cpp:217: instantiated from here /home/porting/ajay/project/Code/CObArray.h:152: no matching function for call to ``vector >::at (int &) const' Relevent code from different files is=20 ***************CObArray.h************************************ template class CObArray { public: CObArray(); virtual ~CObArray(); .=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 T1 & GetAt(int) const { if(index < arr.size()) return (T1&) arr.at(index); } . . protected: vector arr; private: typename vector::iterator iter; } ******************************************************* ***********DbManager.cpp:217************** Result =3D m_UserDirectorySessionList.Find(Index, SessionResult); ****************************** Where m_UserDirectorySessionList is of type=20 C2 m_UserDirectorySessionList; And C2::Find function is in DbUtilities.h template class C2 { private: CObArray m_ValueList; public: . . .=20=20=20=20=20=20=20 long C2::Find(long Index, T& Item) { Item =3D m_ValueList.GetAt(Index); } } What coud be the possible error? -Ajay