Invalid arguments ' Candidates are: #1 transform(#0, #0, #1, #2) #2 transform(#0, #0, #1, #2, #3) '

String S1 = " Hello World " ;
 // entry address predefined function function object function objects 
Transform (s1.begin (), s1.end (), s1.begin (), toupper); 
COUT << << S1 endl; 

String S2 = " the Hello World " ; 
Transform (s2.begin (), s2.end (), s2.begin (), tolower); 
COUT << endl << S2;

In vs normal execution, in gcc error: Invalid arguments' Candidates are: # 1 transform (# 0, # 0, # 1, # 2) # 2 transform (# 0, # 0, # 1, # 2, # 3) '

The reason: vs transform method is called algorithm file, and gcc call is stl_algo.h inside transform method

Guess you like

Origin www.cnblogs.com/sageloris/p/11460562.html