www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/09/24/02:45:43

Date: Mon, 24 Sep 2001 09:26:13 +0300 (WET)
From: Andris Pavenis <pavenis AT lanet DOT lv>
X-Sender: pavenis AT ieva06
To: Chris <anthropomorphic1 AT hotmail DOT com>
Cc: djgpp AT delorie DOT com
Subject: Re: transform
In-Reply-To: <9om405$dvjgq$1@ID-107925.news.dfncis.de>
Message-ID: <Pine.A41.4.05.10109240919290.80012-100000@ieva06>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com


On Sun, 23 Sep 2001, Chris wrote:

> 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;
> }
> 

Prototype is 

int	tolower (int);

Argument and return value is expected to be char for template
instantiation as far as I understand. Introducing inline
function:
	inline char foo (char ch) { return tolower(ch); }
and using it instead of tolower directly helped for me
(gcc-3.0.2 20010912, i686-pc-linux-gnu)

Anyway it's perhaps more usefull to ask this in some C++
language related mailing list

  

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019