VC6 to VC8
-
Why *pBDLd = *pA3Ld; is not going into the function: void CSpanLoad::operator=( const CCASObject &src ) { //.... } In VC6 it was going..In VC8 it s not going? Thanx
-
Why *pBDLd = *pA3Ld; is not going into the function: void CSpanLoad::operator=( const CCASObject &src ) { //.... } In VC6 it was going..In VC8 it s not going? Thanx
I'm not sure exactly, but VC8 is a world away from VC6, in terms of standards compliance. I'd guess you've found a place where VC6 is non compliant. What if you put brackets around the dereferencing operators ? How about if you make the right hand value const ?
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
I'm not sure exactly, but VC8 is a world away from VC6, in terms of standards compliance. I'd guess you've found a place where VC6 is non compliant. What if you put brackets around the dereferencing operators ? How about if you make the right hand value const ?
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
Not working.. When i give *pBDLd = *pA3Ld it is showing error at compile time as: error C2248: 'CObject::operator =' : cannot access private member declared in class 'CObject'" see declaration of 'CObject::operator =' see declaration of 'CObject' This diagnostic occurred in the compiler generated function 'CPtrArray &CPtrArray::operator =(const CPtrArray &)'
-
Why *pBDLd = *pA3Ld; is not going into the function: void CSpanLoad::operator=( const CCASObject &src ) { //.... } In VC6 it was going..In VC8 it s not going? Thanx
How is
CSpanLoad
defined?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
Not working.. When i give *pBDLd = *pA3Ld it is showing error at compile time as: error C2248: 'CObject::operator =' : cannot access private member declared in class 'CObject'" see declaration of 'CObject::operator =' see declaration of 'CObject' This diagnostic occurred in the compiler generated function 'CPtrArray &CPtrArray::operator =(const CPtrArray &)'
You still haven't implemented an assignment operator for your CObject-derived class. The CPtrArray class' assignment operator REQUIRES you to have good copy semantics on the class you store in it.
-
How is
CSpanLoad
defined?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
class __declspec ( dllexport ) CCASObject : public CObject { public: virtual void operator=( const CCASObject& ){} }; class CSpanLoad : public CCASObject { public: void operator=( const CCASObject& ); }; //spanload.cpp void CSpanLoad::operator=( const CCASObject &src ) { //.... }