|
From: Per W. <pw...@ia...> - 2007-11-12 23:43:15
|
Anyway, it is a common problem with C++ and const methods EMA System email: pw...@ia... Per Westermark web: http://iapetus.neab.net Vargvaegen 174B phone: +46 70 214 74 48 S-906 42 Umeaa Sweden On Tue, 13 Nov 2007, Per Westermark wrote: > Don't you think it would help if your mail also contains the > declaration for elenco? > > /pwm > > On Mon, 12 Nov 2007, Alessandro Bugatti wrote: > > > Hello, I wrote this method and I receive an error message in compilation: > > > > bool Dizionario::inDictionary(const string &a) const > > { > > vector<string>::iterator result = > > find( elenco.begin(), elenco.end(), a ); > > if (result == elenco.end()) return false; > > return true; > > } > > > > 598 C:\Programmi\Dev-Cpp\include\c++\3.3.1\bits\stl_iterator.h invalid > > conversion from `const std::string* const' to `std::string*' > > > > I wonder the problem is in elenco.begin() and elenco.end() and the const > > method (if I erase the keyword const the program is OK, but I don't want > > remove const because the method is const). > > Have I cast elenco.begin() and elenco.end()? In which mode? > > Thanks > > Alessandro > > > > -- > > ************************************************ > > Prof. Alessandro Bugatti > > Docente di Informatica > > Istituto Tecnico Industriale Statale B. Castelli > > E-mail: ale...@is... > > Sito web: www.imparando.net > > ************************************************ > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |