|
From: Alessandro B. <ale...@is...> - 2007-11-13 16:14:07
|
Sorry,
vector <string> elenco;
Alessandro
Per Westermark ha scritto:
> 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
>>
>>
>
>
>
>
--
************************************************
Prof. Alessandro Bugatti
Docente di Informatica
Istituto Tecnico Industriale Statale B. Castelli
E-mail: ale...@is...
Sito web: www.imparando.net
************************************************
|