Click here to Skip to main content
15,890,282 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: memory mapped Pin
Niklas L16-Mar-11 4:10
Niklas L16-Mar-11 4:10 
GeneralRe: memory mapped Pin
sarfaraznawaz20-Mar-11 21:12
sarfaraznawaz20-Mar-11 21:12 
GeneralRe: memory mapped Pin
Niklas L20-Mar-11 23:12
Niklas L20-Mar-11 23:12 
GeneralRe: memory mapped Pin
sarfaraznawaz21-Mar-11 0:06
sarfaraznawaz21-Mar-11 0:06 
AnswerRe: memory mapped Pin
Niklas L21-Mar-11 2:06
Niklas L21-Mar-11 2:06 
QuestionHelp Microsoft Scripting Runtime Pin
goldenrose97-Mar-11 1:30
goldenrose97-Mar-11 1:30 
AnswerRe: Help Microsoft Scripting Runtime Pin
KingsGambit7-Mar-11 17:12
KingsGambit7-Mar-11 17:12 
Questionambiguous call to overloaded function.. but, it's not overloaded or ambiguous Pin
tukbriz7-Mar-11 0:49
tukbriz7-Mar-11 0:49 
using vs 2008...

I'm trying to implement my own version of the standard library function:
#include <algorithm>;
copy(  b, e, d  ) ;


but, the line that calls 'my function' gives this error:

error C2668: 'copy' : ambiguous call to overloaded function

I'm guessing copy() is overloaded as it exists already in the standard lib...but I haven't included algorithm..so how would it know???

..also as a side note, if I change the name of 'my function' from copy to..it seems anything else
then I get the error:

error C2676: binary '++' : 'std::string' does not define this operator or a conversion to a type acceptable to the predefined operator

from line:

*dest++ = *begin++;


--------------------------------

#include <string>
using std::string ;

template <class In, class Out> 
Out copy(  In begin,  In end,  Out dest  )
{
	while ( begin != end ) {

		*dest++ = *begin++ ;
	}	
	
	return dest ;
}




int main() {

	string s = "the fox jumped over the moon" ;
	string d ;

	copy(  s.begin(), s.end(), d  ) ;

	return 0 ;

}

AnswerRe: ambiguous call to overloaded function.. but, it's not overloaded or ambiguous Pin
Niklas L7-Mar-11 1:15
Niklas L7-Mar-11 1:15 
GeneralRe: ambiguous call to overloaded function.. but, it's not overloaded or ambiguous Pin
tukbriz8-Mar-11 3:13
tukbriz8-Mar-11 3:13 
AnswerRe: ambiguous call to overloaded function.. but, it's not overloaded or ambiguous Pin
Cool_Dev7-Mar-11 1:30
Cool_Dev7-Mar-11 1:30 
Questionchange highlight color of ClistCtrl when it not in focus Pin
xanagan6666-Mar-11 23:34
xanagan6666-Mar-11 23:34 
AnswerRe: change highlight color of ClistCtrl when it not in focus Pin
Roger Broomfield7-Mar-11 0:35
Roger Broomfield7-Mar-11 0:35 
GeneralRe: change highlight color of ClistCtrl when it not in focus Pin
xanagan6667-Mar-11 4:47
xanagan6667-Mar-11 4:47 
GeneralRe: change highlight color of ClistCtrl when it not in focus Pin
Roger Broomfield7-Mar-11 12:53
Roger Broomfield7-Mar-11 12:53 
QuestionHow can write sheet 2 in xlsx with excel automation? Pin
Le@rner6-Mar-11 18:29
Le@rner6-Mar-11 18:29 
AnswerRe: How can write sheet 2 in xlsx with excel automation? Pin
Roger Broomfield7-Mar-11 1:34
Roger Broomfield7-Mar-11 1:34 
GeneralRe: How can write sheet 2 in xlsx with excel automation? Pin
Le@rner7-Mar-11 1:57
Le@rner7-Mar-11 1:57 
GeneralRe: How can write sheet 2 in xlsx with excel automation? Pin
Roger Broomfield7-Mar-11 4:36
Roger Broomfield7-Mar-11 4:36 
GeneralRe: How can write sheet 2 in xlsx with excel automation? [modified] Pin
Le@rner7-Mar-11 17:22
Le@rner7-Mar-11 17:22 
GeneralRe: How can write sheet 2 in xlsx with excel automation? Pin
Roger Broomfield7-Mar-11 20:34
Roger Broomfield7-Mar-11 20:34 
GeneralRe: How can write sheet 2 in xlsx with excel automation? [modified] Pin
Le@rner7-Mar-11 21:03
Le@rner7-Mar-11 21:03 
GeneralRe: How can write sheet 2 in xlsx with excel automation? Pin
Roger Broomfield7-Mar-11 21:30
Roger Broomfield7-Mar-11 21:30 
GeneralRe: How can write sheet 2 in xlsx with excel automation? [modified] Pin
Le@rner7-Mar-11 21:42
Le@rner7-Mar-11 21:42 
Questionencode char? Pin
Nguyen Sy Bang6-Mar-11 17:55
Nguyen Sy Bang6-Mar-11 17:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.