Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. VC6 to VC8

VC6 to VC8

Scheduled Pinned Locked Moved C / C++ / MFC
question
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sheetal_06
    wrote on last edited by
    #1

    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

    C D 2 Replies Last reply
    0
    • S sheetal_06

      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

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      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

      S 1 Reply Last reply
      0
      • C Christian Graus

        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

        S Offline
        S Offline
        sheetal_06
        wrote on last edited by
        #3

        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 &)'

        M 1 Reply Last reply
        0
        • S sheetal_06

          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

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          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

          S 1 Reply Last reply
          0
          • S sheetal_06

            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 &)'

            M Offline
            M Offline
            Mark Salsbery
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            • D David Crow

              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

              S Offline
              S Offline
              sheetal_06
              wrote on last edited by
              #6

              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 ) { //.... }

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups