Click here to Skip to main content
15,905,563 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Critical Section problems... Pin
Tim Deveaux26-Oct-01 10:20
Tim Deveaux26-Oct-01 10:20 
GeneralRe: Critical Section problems... Pin
HintiFlo23-Jan-02 1:12
HintiFlo23-Jan-02 1:12 
QuestionHow to set a bitmap as a dialog background ? Pin
adara26-Oct-01 4:58
adara26-Oct-01 4:58 
AnswerRe: How to set a bitmap as a dialog background ? Pin
Joaquín M López Muñoz26-Oct-01 5:48
Joaquín M López Muñoz26-Oct-01 5:48 
Generalthanx Pin
adara26-Oct-01 12:19
adara26-Oct-01 12:19 
Generaloverload resolution in VC 6.0 Pin
Patrick D Owens26-Oct-01 4:46
Patrick D Owens26-Oct-01 4:46 
GeneralRe: overload resolution in VC 6.0 Pin
Chris Losinger26-Oct-01 4:55
professionalChris Losinger26-Oct-01 4:55 
GeneralRe: overload resolution in VC 6.0 Pin
Patrick D Owens26-Oct-01 5:16
Patrick D Owens26-Oct-01 5:16 
I tried
strTemp2 = strTemp1 + (long)lTemp1;
and it still gives the C2666 error.
I agree that it probably can't decide the type of that second value, but I have tried changing the overload definitions to

PCSGENRL_EXP_TYPE friend PString operator +(const PString& string, const long& value);
and
PCSGENRL_EXP_TYPE friend PString operator +(const PString& string, long& value);
and
PCSGENRL_EXP_TYPE friend PString operator +(const PString& string, long value);

From what I have read on this error in the help pages, if the compiler can't find an exact match, then it will try to do some conversions to get a match.
You would think that one of the above 3 overloaded definitions would give an exact match so the compiler wouldn't have to do any conversions. But I guess I am missing something. I assume the first argument is fine because I can add a PString and a PString. So it must be something with the second (long) argument, but I can't figure it out.


Pat
GeneralRe: overload resolution in VC 6.0 Pin
Joaquín M López Muñoz26-Oct-01 6:53
Joaquín M López Muñoz26-Oct-01 6:53 
GeneralRe: overload resolution in VC 6.0 Pin
Patrick D Owens26-Oct-01 9:16
Patrick D Owens26-Oct-01 9:16 
GeneralFilling CListCtrl from dll problem... Pin
26-Oct-01 4:39
suss26-Oct-01 4:39 
GeneralRe: Filling CListCtrl from dll problem... Pin
Joaquín M López Muñoz26-Oct-01 7:27
Joaquín M López Muñoz26-Oct-01 7:27 
GeneralAligning text Pin
Andrew Stampor26-Oct-01 3:57
Andrew Stampor26-Oct-01 3:57 
General2-d Graphics Pin
Chambers26-Oct-01 3:52
Chambers26-Oct-01 3:52 
GeneralRe: 2-d Graphics Pin
Remi Morin26-Oct-01 8:33
Remi Morin26-Oct-01 8:33 
GeneralRe: 2-d Graphics Pin
Christian Graus26-Oct-01 11:04
protectorChristian Graus26-Oct-01 11:04 
GeneralRe: 2-d Graphics Pin
Chambers27-Oct-01 0:07
Chambers27-Oct-01 0:07 
GeneralRe: 2-d Graphics Pin
Christian Graus27-Oct-01 0:32
protectorChristian Graus27-Oct-01 0:32 
GeneralON_UPDATE_COMMAND_UI problem... Pin
Remi Morin26-Oct-01 3:50
Remi Morin26-Oct-01 3:50 
GeneralRe: ON_UPDATE_COMMAND_UI problem... Pin
Tomasz Sowinski26-Oct-01 4:01
Tomasz Sowinski26-Oct-01 4:01 
GeneralRe: ON_UPDATE_COMMAND_UI problem... Pin
Chambers26-Oct-01 4:08
Chambers26-Oct-01 4:08 
GeneralRe: ON_UPDATE_COMMAND_UI problem... Pin
Carlos Antollini26-Oct-01 4:12
Carlos Antollini26-Oct-01 4:12 
GeneralRe: ON_UPDATE_COMMAND_UI problem... Pin
Carlos Antollini26-Oct-01 4:17
Carlos Antollini26-Oct-01 4:17 
GeneralDate and Time Picker Control Pin
Steve Thresher26-Oct-01 3:43
Steve Thresher26-Oct-01 3:43 
GeneralListview Custom Draw Pin
Paul C26-Oct-01 1:11
Paul C26-Oct-01 1:11 

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.