June 23rd, 2003, 11:49 AM
transform algorithm in MFC and BCB5
I want to convert a string to uppercase letter. Here goes an example.
This example works in MFC but does not work in BCB5.
std::string sample = "sample testing";
std::transform(sample.begin(), sample.end(), sample.begin(), toupper);
In BCB5, it complains 'could not find a match for std::transform<inputIterator1, InputIterator2, OutputIterator, BinaryOperation>(char *, char*, char*, charT(*)(charT, const locale &))'
Is there anyway to make it work in BCB5?
June 24th, 2003, 02:45 PM
FYI - Just to let you know, your code works in BCB6. I don't have BCB5 so I can't tell you what the problem is there.
Yah, I know it may work in some other Borland compilers but not in BCB5. I've figured it out.