Click here to Skip to main content
15,901,373 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CListCtrl set multiselection Pin
Zizilamoroso16-May-02 5:41
Zizilamoroso16-May-02 5:41 
GeneralRe: CListCtrl set multiselection Pin
KaЯl16-May-02 5:52
KaЯl16-May-02 5:52 
GeneralRe: CListCtrl set multiselection Pin
Jean-Marc Molina3-Oct-03 1:21
Jean-Marc Molina3-Oct-03 1:21 
QuestionDynamically Creat icons? Pin
jimNLX16-May-02 4:38
jimNLX16-May-02 4:38 
AnswerRe: Dynamically Creat icons? Pin
Shog916-May-02 17:22
sitebuilderShog916-May-02 17:22 
Generalcopy-constructor issue Pin
Carlos Sánchez García16-May-02 4:29
Carlos Sánchez García16-May-02 4:29 
GeneralRe: copy-constructor issue Pin
Joaquín M López Muñoz16-May-02 5:02
Joaquín M López Muñoz16-May-02 5:02 
GeneralRe: copy-constructor issue Pin
Mike Nordell16-May-02 5:33
Mike Nordell16-May-02 5:33 
Even that your code made no sense as-is (due to lack of formatting and HTML "stealing" your "<" and ">" chars), the error is most definitely in your use of memcpy.

If you want to copy objects, copy objects. As a rule-of-thumb (and unless you're prepared to not being able to maintain the code yourself a short while from now), never ever memcpy a non-POD type.

Replace your DogHouse constructor (the one taking a Dog* and a size_t) with a version that really does the copy, like:
std::copy(lpDog, lpDog + size, p);
and you should at least be closer to a solution. Though, since you are already copying Dog's around here, I see no reason to not use the standard vector.
GeneralRe: copy-constructor issue Pin
Maxwell Chen16-May-02 19:26
Maxwell Chen16-May-02 19:26 
GeneralRe: copy-constructor issue Pin
Carlos Sánchez García16-May-02 23:45
Carlos Sánchez García16-May-02 23:45 
GeneralRe: copy-constructor issue Pin
Mike Nordell17-May-02 1:30
Mike Nordell17-May-02 1:30 
GeneralRecording Audio Pin
AJ12316-May-02 4:15
AJ12316-May-02 4:15 
GeneralRe: Recording Audio Pin
redeemer16-May-02 4:17
redeemer16-May-02 4:17 
QuestionHow do i assign a string to each item in a ListView? Pin
redeemer16-May-02 4:10
redeemer16-May-02 4:10 
AnswerRe: How do i assign a string to each item in a ListView? Pin
Chris Losinger16-May-02 5:03
professionalChris Losinger16-May-02 5:03 
GeneralRe: How do i assign a string to each item in a ListView? Pin
redeemer16-May-02 5:08
redeemer16-May-02 5:08 
GeneralRe: How do i assign a string to each item in a ListView? Pin
Chris Losinger16-May-02 5:17
professionalChris Losinger16-May-02 5:17 
GeneralRe: How do i assign a string to each item in a ListView? Pin
redeemer16-May-02 5:38
redeemer16-May-02 5:38 
GeneralRe: How do i assign a string to each item in a ListView? Pin
Chris Losinger16-May-02 6:36
professionalChris Losinger16-May-02 6:36 
GeneralDialogs question Pin
BlackRider16-May-02 3:50
BlackRider16-May-02 3:50 
GeneralRe: Dialogs question Pin
Prem Kumar16-May-02 3:48
Prem Kumar16-May-02 3:48 
GeneralRe: Dialogs question Pin
Chris Losinger16-May-02 3:56
professionalChris Losinger16-May-02 3:56 
GeneralRe: Dialogs question Pin
Nish Nishant16-May-02 4:04
sitebuilderNish Nishant16-May-02 4:04 
QuestionIs there a tool that I can find all the bmp file in one directroy (include the bmp file in exe ,dll)? Pin
16-May-02 3:07
suss16-May-02 3:07 
AnswerRe: Is there a tool that I can find all the bmp file in one directroy (include the bmp file in exe ,dll)? Pin
16-May-02 6:49
suss16-May-02 6:49 

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.