Click here to Skip to main content
15,904,653 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: _variant_t causing linker error Pin
David Crow12-Apr-04 4:28
David Crow12-Apr-04 4:28 
GeneralRe: _variant_t causing linker error Pin
yanuart12-Apr-04 6:23
yanuart12-Apr-04 6:23 
Generalcreating name pipe Pin
pnpfriend12-Apr-04 3:40
pnpfriend12-Apr-04 3:40 
GeneralRe: creating name pipe Pin
GuimaSun12-Apr-04 7:51
GuimaSun12-Apr-04 7:51 
GeneralRe: creating name pipe Pin
pnpfriend13-Apr-04 7:47
pnpfriend13-Apr-04 7:47 
GeneralExperts help reg threads Pin
ykutanoor12-Apr-04 3:14
ykutanoor12-Apr-04 3:14 
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 
Hi there,

If I add a CArray such as CByteArray to a struct like so:
<br />
typedef struct DATAGRAM<br />
{<br />
   // other types here...<br />
   CByteArray pkt_data; 	// Packet data<br />
} DATAGRAM;<br />


and then try and assign something of type DATAGRAM to type DATAGRAM i get the following compile error:
C2558: struct 'DATAGRAM' : no copy constructor available or copy constructor is declared 'explicit'

I know this is because because CByteArray is of dynamic type so I need to provide a copy constructor. So my question is do I need to provide one for DATAGRAM or do I really need to provide one for CByteArray and if so could somebody post a code snippet to help me out?

Cheers

Packetlos
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 
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 

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.