#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    2
    Rep Power
    0

    Question transform algorithm in MFC and BCB5


    I want to convert a string to uppercase letter. Here goes an example.

    Code:
    std::string sample = "sample testing";
    
    std::transform(sample.begin(), sample.end(), sample.begin(), toupper);
    This example works in MFC but does not work in BCB5.

    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?

    Thanks.
  2. #2
  3. Big Endian
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    May 2001
    Location
    Fly-over country
    Posts
    1,172
    Rep Power
    30
    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.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    2
    Rep Power
    0
    Yah, I know it may work in some other Borland compilers but not in BCB5. I've figured it out.

    Thanks.

IMN logo majestic logo threadwatch logo seochat tools logo