Reputation: 119
I am getting the following error:
C2440: 'type cast' : cannot convert from 'bool' to 'CString'
for the following code:
if ((CString)XSave->GetVersionAt(j).HasService_Ref())
m_pVersion->SetstrServicesRef((CString)XSave->GetVersionAt(j).GetService_Ref());
Any help is appreciated.
Upvotes: 0
Views: 1408
Reputation: 9089
Looks like HasService_Ref
returns bool
but you casts it to CString
occasionally inside if
condition. Remove the cast and it shall work.
Upvotes: 1