compilation error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ice8595
    New Member
    • Mar 2007
    • 13

    #1

    compilation error

    Hi there,

    I'm a newbie at this, and I would really appreciate some help on this.

    I have a class called Writer, and in different class I have a dynamic Writer array called xmlWriterArray.

    //create a new XML writer for the new output file
    Writer* w= new Writer ();

    //add the new writer into xmlWriterArray
    xmlWriterArray [xmlCount-1] = w;

    I want to add a new writer object to the array. But the last line above is giving me:

    c:\Documents and Settings\My Documents\code\ MessageHandler. cpp(127): error C2679: binary '=' : no operator found which takes a right-hand operand of type 'Writer *' (or there is no acceptable conversion)

    It seems like a fairly straight forward error...but I can't seem to figure out how to fix it.

    Any help would be greatly appreciated.

    Thanks
  • ice8595
    New Member
    • Mar 2007
    • 13

    #2
    never mind
    i figured it out
    haha

    Comment

    • Ganon11
      Recognized Expert Specialist
      • Oct 2006
      • 3651

      #3
      From what I can see, it looks like you had an array of Writer objects in xmlWriterArray, but you were trying to assign a Writer* to it. Was this the error?

      Comment

      Working...