Click here to Skip to main content
15,888,461 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: STL List - object creation / destruction wierdness Pin
Stuart Dootson7-Sep-06 9:05
professionalStuart Dootson7-Sep-06 9:05 
AnswerRe: STL List - object creation / destruction wierdness Pin
Zac Howland7-Sep-06 9:23
Zac Howland7-Sep-06 9:23 
GeneralRe: STL List - object creation / destruction wierdness Pin
neilsolent7-Sep-06 9:49
neilsolent7-Sep-06 9:49 
GeneralRe: STL List - object creation / destruction wierdness Pin
Zac Howland7-Sep-06 11:03
Zac Howland7-Sep-06 11:03 
GeneralRe: STL List - object creation / destruction wierdness Pin
Stuart Dootson8-Sep-06 3:01
professionalStuart Dootson8-Sep-06 3:01 
GeneralRe: STL List - object creation / destruction wierdness Pin
Zac Howland8-Sep-06 3:57
Zac Howland8-Sep-06 3:57 
GeneralRe: STL List - object creation / destruction wierdness Pin
Stuart Dootson8-Sep-06 5:48
professionalStuart Dootson8-Sep-06 5:48 
GeneralRe: STL List - object creation / destruction wierdness Pin
Zac Howland8-Sep-06 6:06
Zac Howland8-Sep-06 6:06 
Stuart Dootson wrote:
Sorry - what I should have said was that I didn't like the comparison of the copy constructor to memcpy - it copies each member individually, it doesn't just copy the raw bytes of the object. Which is why I'm quite happy to rely on implicit copy constructors - because 99% of the time, they're implementing what I'd be implementing anyway.


The main reason I compare it to memcpy is simply to emphasize that if you have a pointer member variable, only the pointer value will be copied (that is, a new object that the pointer is pointing to will not be created).

As a side note, they will only implement what you would do if your data members are simple types. If they are complex types that don't have a copy-constructor/assignment operator defined, chances are it isn't going to do what you would expect (e.g. if you have a custom vector-type class that doesn't have a copy-constructor).

Stuart Dootson wrote:
I take your point about having copy constructors to step through @ debug time - it's just not something I find myself doing.


After finding myself trying to debug implicit functions several times, I got in the habit of making sure they were explicit. It only takes one time of spending a week trying to figure out why your code doesn't work (when it should) before you want to make sure you don't run into the problem again.

If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week

Zac

QuestionRelease build seg faults at vector push_back Pin
rana745-Sep-06 6:38
rana745-Sep-06 6:38 
AnswerRe: Release build seg faults at vector push_back Pin
led mike5-Sep-06 6:55
led mike5-Sep-06 6:55 
AnswerRe: Release build seg faults at vector push_back Pin
valikac5-Sep-06 8:12
valikac5-Sep-06 8:12 
AnswerRe: Release build seg faults at vector push_back Pin
Zac Howland7-Sep-06 9:27
Zac Howland7-Sep-06 9:27 
QuestionIs it possible to convert Visual C++ program with GUI into COM DLL or ActiveX ? Pin
peysock5-Sep-06 6:35
peysock5-Sep-06 6:35 
AnswerRe: Is it possible to convert Visual C++ program with GUI into COM DLL or ActiveX ? Pin
Kevin McFarlane6-Sep-06 5:17
Kevin McFarlane6-Sep-06 5:17 
AnswerRe: Is it possible to convert Visual C++ program with GUI into COM DLL or ActiveX ? Pin
Zac Howland7-Sep-06 9:31
Zac Howland7-Sep-06 9:31 
GeneralRe: Is it possible to convert Visual C++ program with GUI into COM DLL or ActiveX ? Pin
peysock8-Sep-06 3:34
peysock8-Sep-06 3:34 
Questioniterator problem in release builds Pin
rana745-Sep-06 1:24
rana745-Sep-06 1:24 
QuestionRe: iterator problem in release builds Pin
prasad_som5-Sep-06 1:54
prasad_som5-Sep-06 1:54 
Question#define for checked-iterators Pin
rana744-Sep-06 0:10
rana744-Sep-06 0:10 
AnswerRe: #define for checked-iterators Pin
User 2155974-Sep-06 1:30
User 2155974-Sep-06 1:30 
QuestionATL inheritance Pin
palako2-Sep-06 11:18
palako2-Sep-06 11:18 
AnswerRe: ATL inheritance Pin
Steve S7-Sep-06 3:10
Steve S7-Sep-06 3:10 
Questionhow i block the e-mail attachment in VC++? Pin
salman kazi31-Aug-06 0:30
salman kazi31-Aug-06 0:30 
AnswerRe: how i block the e-mail attachment in VC++? Pin
prasad_som31-Aug-06 3:51
prasad_som31-Aug-06 3:51 
QuestionSelecting an item in listview via windows api. Pin
Marco225030-Aug-06 2:17
Marco225030-Aug-06 2:17 

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.