Click here to Skip to main content
15,907,183 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: To the regulars of forum 1647... (urgentz seasons greetings) Pin
Jijo.Raj23-Dec-08 11:22
Jijo.Raj23-Dec-08 11:22 
AnswerRe: To the regulars of forum 1647... (urgentz seasons greetings) Pin
john563223-Dec-08 21:31
john563223-Dec-08 21:31 
AnswerRe: To the regulars of forum 1647... (urgentz seasons greetings) Pin
Cedric Moonen23-Dec-08 21:52
Cedric Moonen23-Dec-08 21:52 
JokeRe: To the regulars of forum 1647... (urgentz seasons greetings) Pin
toxcct24-Dec-08 2:02
toxcct24-Dec-08 2:02 
GeneralRe: To the regulars of forum 1647... (urgentz seasons greetings) Pin
Iain Clarke, Warrior Programmer24-Dec-08 5:12
Iain Clarke, Warrior Programmer24-Dec-08 5:12 
AnswerRe: To the regulars of forum 1647... (urgentz seasons greetings) Pin
SandipG 24-Dec-08 20:02
SandipG 24-Dec-08 20:02 
AnswerRe: To the regulars of forum 1647... (urgentz seasons greetings) Pin
Rajesh R Subramanian28-Dec-08 5:02
professionalRajesh R Subramanian28-Dec-08 5:02 
QuestionSTL Lists and base/derived classes Pin
mjackson1123-Dec-08 9:31
mjackson1123-Dec-08 9:31 
I have four or five kinds of objects, all derived from an indexedObject. indexedObject's have an integer id which can be set and they can be compared with <, >, etc to facilitate sorting, pretty simple class.

I would like to create one class that wraps a list and adds some other functionality and can hold all these kinds of objects. Problem is if I use a std::list<indexedObject> to hold the objects, I lose access to the functions not in indexedObject.

I would store pointers but then sorting and looking up the objects would require lots of extra code.

Is there a way to use the std::list<indexedObject> list to store the objects and cast them back to their derived type as appropriate? I can't use the assignment operator, I get an error.

I thought about all kinds of things like memcpy or something but it seems as if I resort to that I am getting pretty far off the reservation.

Any suggestions?
QuestionRe: STL Lists and base/derived classes Pin
CPallini23-Dec-08 10:19
mveCPallini23-Dec-08 10:19 
AnswerRe: STL Lists and base/derived classes Pin
Code-o-mat23-Dec-08 10:24
Code-o-mat23-Dec-08 10:24 
AnswerRe: STL Lists and base/derived classes Pin
mjackson1123-Dec-08 18:20
mjackson1123-Dec-08 18:20 
QuestionPrinting through C Pin
Razanust23-Dec-08 9:09
Razanust23-Dec-08 9:09 
AnswerRe: Printing through C Pin
Iain Clarke, Warrior Programmer23-Dec-08 9:59
Iain Clarke, Warrior Programmer23-Dec-08 9:59 
AnswerRe: Printing through C Pin
CPallini23-Dec-08 10:04
mveCPallini23-Dec-08 10:04 
QuestionRight Click on dialong button. Pin
ScotDolan23-Dec-08 4:53
ScotDolan23-Dec-08 4:53 
AnswerRe: Right Click on dialong button. Pin
Stuart Dootson23-Dec-08 5:20
professionalStuart Dootson23-Dec-08 5:20 
AnswerRe: Right Click on dialong button. Pin
Jijo.Raj23-Dec-08 5:24
Jijo.Raj23-Dec-08 5:24 
QuestionGDI CreatBitMap Pin
King Tran23-Dec-08 3:23
King Tran23-Dec-08 3:23 
AnswerRe: GDI CreatBitMap Pin
Code-o-mat23-Dec-08 4:20
Code-o-mat23-Dec-08 4:20 
AnswerRe: GDI CreatBitMap Pin
Chris Losinger23-Dec-08 8:33
professionalChris Losinger23-Dec-08 8:33 
QuestionHow to obtain effect of zooming in VC++? Pin
Slnksachin23-Dec-08 3:03
Slnksachin23-Dec-08 3:03 
AnswerRe: How to obtain effect of zooming in VC++? Pin
CPallini23-Dec-08 3:08
mveCPallini23-Dec-08 3:08 
AnswerRe: How to obtain effect of zooming in VC++? [modified] Pin
Jijo.Raj23-Dec-08 3:15
Jijo.Raj23-Dec-08 3:15 
AnswerRe: How to obtain effect of zooming in VC++? Pin
bob1697223-Dec-08 17:21
bob1697223-Dec-08 17:21 
QuestionQRS detector GUI Pin
Shteki23-Dec-08 1:56
Shteki23-Dec-08 1:56 

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.