not match function for call to transform

E

eric

Dear advanced c++ programers:

I tried 4.14 Doing a Case-Insensitive String Search from book C++
cookbook on page 173, example 4-22
on my g++ 4.5.2 system
but I got compile error
----------------------------------
eric@eric-laptop:~/cppcookbook/ch4$ g++ Example4-22.cpp
Example4-22.cpp: In function ‘std::basic_string<char>::const_iterator
caseInsFind(std::string&, const std::string&)’:
Example4-22.cpp:19:20: error: no matching function for call to
‘transform(std::basic_string<char>::const_iterator,
std::basic_string<char>::const_iterator,
std::back_insert_iterator<std::basic_string<char> >, <unresolved
overloaded function type>)’
 
I

Ian Collins

Dear advanced c++ programers:

I tried 4.14 Doing a Case-Insensitive String Search from book C++
cookbook on page 173, example 4-22
on my g++ 4.5.2 system
but I got compile error
----------------------------------
eric@eric-laptop:~/cppcookbook/ch4$ g++ Example4-22.cpp
Example4-22.cpp: In function ‘std::basic_string<char>::const_iterator
caseInsFind(std::string&, const std::string&)’:
Example4-22.cpp:19:20: error: no matching function for call to
‘transform(std::basic_string<char>::const_iterator,
std::basic_string<char>::const_iterator,
std::back_insert_iterator<std::basic_string<char> >,<unresolved
overloaded function type>)’

g++ is picking the wrong toupper, try ::toupper.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top