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. Can anyone help me ~please~~~!!

Can anyone help me ~please~~~!!

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
3 Posts 3 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.
  • E Offline
    E Offline
    ebinaini
    wrote on last edited by
    #1

    i have a problem about overload operator = this is my code CStringList& CTESTADOView::operator =(CStr &str) { this->lst=str.list; return(lst); } : error C2582: 'CStringList' : 'operator =' function is unavailable can anyone tell me where the wrong?? thanks in advance~~~!:laugh::laugh::laugh::laugh: nothing

    A T 2 Replies Last reply
    0
    • E ebinaini

      i have a problem about overload operator = this is my code CStringList& CTESTADOView::operator =(CStr &str) { this->lst=str.list; return(lst); } : error C2582: 'CStringList' : 'operator =' function is unavailable can anyone tell me where the wrong?? thanks in advance~~~!:laugh::laugh::laugh::laugh: nothing

      A Offline
      A Offline
      Aamir Butt
      wrote on last edited by
      #2

      From the compiler message: There is something wrong with = overloaded operator of CStringList. This means that there is no overloaded operator = for CStringList hence you cannot assign one List to another like you did. You will have to use some alternative method to do this like copying all the elements of one list to the other in a loop. e.g., something like: for(int i=0; ilist.AddTail(str.list.GetAt(i)); } Steve Mayfield: "Coding in VB is like riding a tricycle...once you figured out how to peddle, its really hard to fall off." My Articles

      1 Reply Last reply
      0
      • E ebinaini

        i have a problem about overload operator = this is my code CStringList& CTESTADOView::operator =(CStr &str) { this->lst=str.list; return(lst); } : error C2582: 'CStringList' : 'operator =' function is unavailable can anyone tell me where the wrong?? thanks in advance~~~!:laugh::laugh::laugh::laugh: nothing

        T Offline
        T Offline
        toxcct
        wrote on last edited by
        #3

        to sum Aamir up, you dont call the same function that is define in the CStringList class... check the parameters, their types...


        TOXCCT >>> GEII power
        [toxcct][VisualCalc]

        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