Click here to Skip to main content
16,011,482 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionHow to use "IEnumString" in MFC project? Pin
simonchen.net19-Aug-03 17:43
simonchen.net19-Aug-03 17:43 
GeneralSTL compiler messages. Pin
WREY19-Aug-03 11:44
WREY19-Aug-03 11:44 
GeneralRe: STL compiler messages. Pin
valikac19-Aug-03 13:01
valikac19-Aug-03 13:01 
GeneralRe: STL compiler messages. Pin
Andrew Walker19-Aug-03 13:10
Andrew Walker19-Aug-03 13:10 
GeneralRe: STL compiler messages. Pin
John M. Drescher19-Aug-03 13:54
John M. Drescher19-Aug-03 13:54 
GeneralMessages Pin
cberam19-Aug-03 1:44
cberam19-Aug-03 1:44 
QuestionList of object or list of pointers to objects? Pin
Jeremy Pullicino18-Aug-03 21:34
Jeremy Pullicino18-Aug-03 21:34 
AnswerRe: List of object or list of pointers to objects? Pin
jhwurmbach18-Aug-03 21:57
jhwurmbach18-Aug-03 21:57 
It depends on how 'expensive' copying your objects is. If all you need to coppy is two pointers to strings (std::string or CString) and a long int, probably having a list < Book > is OK. But if you need to store a lot of data in your objects, copying around the elements gets expensive.
The downside for a list < Book* > is that you need to provide all kind of sorting functionality yourself (as you do not want to sort on your pointers numerical value, but on the property of the underlying object. You end up writing a lot of functors yourself.

Maybe you can write some sort of proxy-class, which contains a pointer to a Book-object with all the data, and provides the needed operators to get sorted automatically by the STL-build in routines. operator!=() and operator<() should be sufficient for sorting. Additionally you would probably need constructor/destructor, copy-constructor and assignment-operator, You would then have the best of both worlds: Transparent working with the proxy-objects and cheap copying.



Who is 'General Failure'? And why is he reading my harddisk?!?
GeneralRe: List of object or list of pointers to objects? Pin
Jeremy Pullicino18-Aug-03 22:37
Jeremy Pullicino18-Aug-03 22:37 
GeneralRe: List of object or list of pointers to objects? Pin
jhwurmbach18-Aug-03 23:30
jhwurmbach18-Aug-03 23:30 
AnswerRe: List of object or list of pointers to objects? Pin
Andrew Walker19-Aug-03 1:27
Andrew Walker19-Aug-03 1:27 
GeneralSTL list Pin
Anthony_Yio18-Aug-03 21:01
Anthony_Yio18-Aug-03 21:01 
GeneralRe: STL list Pin
jhwurmbach18-Aug-03 21:38
jhwurmbach18-Aug-03 21:38 
GeneralRe: STL list Pin
Anthony_Yio18-Aug-03 22:20
Anthony_Yio18-Aug-03 22:20 
GeneralRe: STL list Pin
Jeremy Pullicino18-Aug-03 21:39
Jeremy Pullicino18-Aug-03 21:39 
GeneralRe: STL list Pin
Anthony_Yio18-Aug-03 22:03
Anthony_Yio18-Aug-03 22:03 
GeneralRe: STL list Pin
jhwurmbach18-Aug-03 22:09
jhwurmbach18-Aug-03 22:09 
GeneralRe: STL list Pin
Anthony_Yio18-Aug-03 22:23
Anthony_Yio18-Aug-03 22:23 
GeneralRe: STL list Pin
Anthony_Yio18-Aug-03 22:37
Anthony_Yio18-Aug-03 22:37 
GeneralRe: STL list Pin
jhwurmbach18-Aug-03 23:22
jhwurmbach18-Aug-03 23:22 
GeneralRe: STL list Pin
Anthony_Yio19-Aug-03 17:03
Anthony_Yio19-Aug-03 17:03 
GeneralEvents Pin
cberam18-Aug-03 2:11
cberam18-Aug-03 2:11 
GeneralRe: Events Pin
valikac18-Aug-03 12:04
valikac18-Aug-03 12:04 
GeneralRe: Events Pin
cberam18-Aug-03 17:51
cberam18-Aug-03 17:51 
GeneralRE: Help Pin
HansonDavid16-Aug-03 23:48
HansonDavid16-Aug-03 23:48 

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.