| delorie.com/archives/browse.cgi | search |
| From: | "Chris" <anthropomorphic1 AT hotmail DOT com> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: transform |
| Date: | Mon, 24 Sep 2001 20:13:09 -0400 |
| Lines: | 42 |
| Message-ID: | <9ooi7f$eph6i$1@ID-107925.news.dfncis.de> |
| References: | <9om405$dvjgq$1 AT ID-107925 DOT news DOT dfncis DOT de> |
| NNTP-Posting-Host: | pool-151-197-195-171.phil.east.verizon.net (151.197.195.171) |
| X-Trace: | fu-berlin.de 1001376815 15516882 151.197.195.171 (16 [107925]) |
| X-Priority: | 3 |
| X-MSMail-Priority: | Normal |
| X-Newsreader: | Microsoft Outlook Express 5.50.4522.1200 |
| X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4522.1200 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
ok this seems to work
#include <iostream>
#include <algorithm>
#include <string>
char f(char ch){return tolower(ch);}
using namespace std;
int main()
{
string s = ("HELLO");
transform(s.begin(),s.end(),s.begin(),f);
cout<<s<<std::endl;
}
"Chris" <anthropomorphic1 AT hotmail DOT com> wrote in message
news:9om405$dvjgq$1 AT ID-107925 DOT news DOT dfncis DOT de...
> i just installed the DJGPP 3.0 i believe.
> it has these files in it gcc30b.zip gpp30b.zip
> i got some things to compile but I couldn't get
> this piece to compile does anybody have any idea
> why this wouldn't
> I get an ERROR no matching function for call to
> transform etc
>
> #include <iostream>
> #include <algorithm>
> #include <cctype>
> #include <string>
> using namespace std;
> int main()
> {
> string s = ("HELLO");
>
> transform(s.begin(),s.end(),s.begin(),tolower);
>
> cout<<s<<endl;
> }
>
>
>
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |