Click here to Skip to main content
15,921,113 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Experts help reg threads Pin
David Crow12-Apr-04 3:30
David Crow12-Apr-04 3:30 
Generalcopy constructor Pin
packetlos12-Apr-04 3:12
packetlos12-Apr-04 3:12 
GeneralRe: copy constructor Pin
toxcct12-Apr-04 3:50
toxcct12-Apr-04 3:50 
GeneralRe: copy constructor Pin
antlers12-Apr-04 5:01
antlers12-Apr-04 5:01 
GeneralRe: copy constructor Pin
packetlos12-Apr-04 5:17
packetlos12-Apr-04 5:17 
GeneralRe: copy constructor Pin
Tim Smith12-Apr-04 6:23
Tim Smith12-Apr-04 6:23 
GeneralRe: copy constructor Pin
toxcct12-Apr-04 9:07
toxcct12-Apr-04 9:07 
GeneralRe: copy constructor Pin
John R. Shaw12-Apr-04 11:05
John R. Shaw12-Apr-04 11:05 
Remember that a struct in C++ is a class that defaults to public access and a normal class defaults to private access. Since DATAGRAM has a dynamic member it does require a copy constructor:

struct DATAGRAM
{
    // other types here...
    CByteArray pkt_data;

    // ctor
    DATAGRAM(DATAGRAM& dg)
    {
        // copy other type here...
        pkt_data.Copy(dg.pkt_data); // Copy packet data
    }
};


Note: I did not use a typedef because it is not needed in C++.

Good Luck!Smile | :)

Now if the blastedMad | :mad: power does not go out again, you'll get this message!


INTP
GeneralRe: copy constructor Pin
Paul Ranson13-Apr-04 2:03
Paul Ranson13-Apr-04 2:03 
QuestionHow can stor a listbox strings with serialization? Pin
Mehdi_Hosseinpour12-Apr-04 2:59
Mehdi_Hosseinpour12-Apr-04 2:59 
AnswerRe: How can stor a listbox strings with serialization? Pin
David Crow12-Apr-04 3:39
David Crow12-Apr-04 3:39 
GeneralRe: How can stor a listbox strings with serialization? Pin
Ravi Bhavnani12-Apr-04 9:10
professionalRavi Bhavnani12-Apr-04 9:10 
GeneralRe: How can stor a listbox strings with serialization? Pin
David Crow12-Apr-04 9:13
David Crow12-Apr-04 9:13 
AnswerRe: How can stor a listbox strings with serialization? Pin
Ravi Bhavnani12-Apr-04 9:09
professionalRavi Bhavnani12-Apr-04 9:09 
GeneralNot able to navigate data between vc++ project and USB device. Pin
Pankaj Bhalla12-Apr-04 2:59
Pankaj Bhalla12-Apr-04 2:59 
GeneralRe: Not able to navigate data between vc++ project and USB device. Pin
Darshan Jani12-Apr-04 7:21
Darshan Jani12-Apr-04 7:21 
GeneralRe: Not able to navigate data between vc++ project and USB device. Pin
Pankaj Bhalla13-Apr-04 0:15
Pankaj Bhalla13-Apr-04 0:15 
GeneralGDI Pin
Ni@m12-Apr-04 2:42
Ni@m12-Apr-04 2:42 
GeneralRe: GDI Pin
Indrawati12-Apr-04 2:50
Indrawati12-Apr-04 2:50 
Generalfreeing memory for an array Pin
kfaday12-Apr-04 2:38
kfaday12-Apr-04 2:38 
GeneralRe: freeing memory for an array Pin
Anonymous12-Apr-04 2:45
Anonymous12-Apr-04 2:45 
GeneralRe: freeing memory for an array Pin
kfaday12-Apr-04 2:49
kfaday12-Apr-04 2:49 
GeneralRe: freeing memory for an array Pin
Indrawati12-Apr-04 2:53
Indrawati12-Apr-04 2:53 
GeneralRe: freeing memory for an array Pin
David Crow12-Apr-04 3:43
David Crow12-Apr-04 3:43 
QuestionDependency Walker lists a DLL as missing. However, program works without Error. Why? Pin
Tony Westminster12-Apr-04 2:26
Tony Westminster12-Apr-04 2:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.