Can someone explain this error?

This is a discussion on Can someone explain this error? within the Windows Programming forums, part of the Platform Specific Boards category;

  1. #1

    Can someone explain this error?

  2. #2
    Registered User ski6ski's Avatar
    Join Date
    Aug 2001
    hmmm...... i have been getting hits on my firewall from
    C++ Is Powerful
    I use C++
    There fore I am Powerful

  3. #3
    Former Member
    Join Date
    Oct 2001
    sorry man, it's a very large image, try zipping it to make it easier to download


  4. #4
    Registered User cody's Avatar
    Join Date
    Sep 2001



    well as the compiler error indicates, your class has no copy constructor, which could look like:

    yourClass (const yourclass &c_roOther);

    #include "reallife.h"

  5. #5
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Your overload looks a little odd too. Typically an assignment operator overload looks like this...

    Xyz operator = (Xyz instance)

    ... although you should always be careful about returning classes from a function without specifying a copy constructor.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  6. #6
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Hannover, Germany
    Your assignment operator looks fine as long as it returns *this
    and copies your member variables.

    You need a copy constructor like this though:

    CLocation( const CLocation& other )
    *this = other;

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. An error is driving me nuts!
    By ulillillia in forum C Programming
    Replies: 5
    Last Post: 04-04-2009, 10:15 PM
  2. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  3. Avoiding Global variables
    By csonx_p in forum Windows Programming
    Replies: 32
    Last Post: 05-19-2008, 01:17 AM
  4. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  5. Connecting to a mysql server and querying problem
    By Diod in forum C++ Programming
    Replies: 8
    Last Post: 02-13-2006, 10:33 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21