Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Another error when trying to convert VC++ 5.0 to VC++ 6.
Message
De
18/09/2000 18:05:39
 
Information générale
Forum:
Visual C++
Catégorie:
Problèmes
Divers
Thread ID:
00417539
Message ID:
00417835
Vues:
39
>Hello all!
>
>I'm still trying to convert a c++ program (written with VC++ 5.0) to VC++ 6.0.
>
>There are several includes that my program uses, this time the problem is with the Microsoft include-file 'XMEMORY' (included from 'MEMORY' that itself is included by 'VECTOR').
>
>In my code there is this command:
>
p_Record.*(it->m_pName) == *(it->m_pValue)
>
>Now I get the error:
>
>error C2678: Binärer Operator '==' : Kein Operator definiert, der einen linksseitigen Operator vom Typ 'const class C_DBI_Attribute' akzeptiert.
>E:\Programme\Microsoft Visual Studio\VC98\Include\xmemory(66)...
>in english something like:
>
>error C2678: binary operator '==' : no operator defined, that accepts a leftsided operator from type 'const class C_DBI_Attribute'.
>E:\Programme\Microsoft Visual Studio\VC98\Include\xmemory(66)...
>
>'C_DBI_Attribute' is a class of my program that uses the MS template-class VECTOR and p_Record is an instance of it.
>
>Thank you all in advance, I hope anyone can help me.
>Judith
>
>P.S.: my last converting problem is still a problem...

Judith, your code
p_Record.*(it->m_pName) == *(it->m_pValue)
includes the equality operator (==) rather than the assignment operator (=) but you aren't testing for equality here. There are two ways your code could go here.

if (p_Record.*(it->m_pName) == *(it->m_pValue)
{Do something here}

or

p_Record.*(it->m_pName) = *(it->m_pValue) ;

Depending on which you are trying to accomplish.

Regards,
Jason Tryon
Senior Systems Analyst / Technical Lead
eBusiness / iPage
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform