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

C / C++ / MFC

 
QuestionRe: How to export registry settings safely under Windows 7? Pin
David Crow27-Jan-10 4:43
David Crow27-Jan-10 4:43 
QuestionHow to use java function in C++? Pin
002comp26-Jan-10 19:41
002comp26-Jan-10 19:41 
QuestionRe: How to use java function in C++? Pin
Avi Berger26-Jan-10 19:47
Avi Berger26-Jan-10 19:47 
AnswerRe: How to use java function in C++? Pin
002comp26-Jan-10 21:12
002comp26-Jan-10 21:12 
GeneralRe: How to use java function in C++? Pin
Richard MacCutchan26-Jan-10 22:31
mveRichard MacCutchan26-Jan-10 22:31 
QuestionCMDIChildWnd Caption Not Updated When Child maximized Pin
Anu_Bala26-Jan-10 18:47
Anu_Bala26-Jan-10 18:47 
Questionre:What c++ container fits these requirements? Pin
Alan Kurlansky26-Jan-10 17:09
Alan Kurlansky26-Jan-10 17:09 
AnswerRe: re:What c++ container fits these requirements? [modified] Pin
Avi Berger26-Jan-10 18:14
Avi Berger26-Jan-10 18:14 
The first data structure that comes to my mind for this is a B+ tree with a pooled memory allocator for nodes. Now there isn't one of these sitting around in the standard library. It also may not be the most effective tree data structure for your needs. It is slanted towards moving through consecutive elements once you find your starting point.

What I would try first is the tree based container available in the STL. This is std::set ( std::map if your key was separate from your payload). For your usage, you would provide your own binary predicate implementing less for your objects (with a built-in level of indirection since you are using pointers). I believe that this is generally implemented using a red-black tree and emphasizes effective insertion and deletion of nodes.

Rather than creating a second container for reverse order, just use one and go backward for the reverse order.

You'd have to run some test to see if this would meet your performance requirements.

Any solution will compromise one thing for something else. You may have to experiment to discover what is suitable for your actual balance of activities.

modified on Wednesday, January 27, 2010 1:32 AM

GeneralRe: re:What c++ container fits these requirements? Pin
Alan Kurlansky27-Jan-10 2:39
Alan Kurlansky27-Jan-10 2:39 
QuestionCreateCheckBox Pin
Member 686483926-Jan-10 8:32
Member 686483926-Jan-10 8:32 
QuestionRe: CreateCheckBox Pin
David Crow26-Jan-10 9:28
David Crow26-Jan-10 9:28 
AnswerRe: CreateCheckBox Pin
neyerMat26-Jan-10 12:30
neyerMat26-Jan-10 12:30 
QuestionCombo Box vertical scroll bar height Pin
dipuks26-Jan-10 8:02
dipuks26-Jan-10 8:02 
QuestionSocket details using PID Pin
Anu A Joseph26-Jan-10 7:50
Anu A Joseph26-Jan-10 7:50 
AnswerRe: Socket details using PID Pin
HetzelGJ26-Jan-10 14:40
HetzelGJ26-Jan-10 14:40 
QuestionCreateTimerQueueTimer huge delays [modified] Pin
BDMarler26-Jan-10 7:21
BDMarler26-Jan-10 7:21 
AnswerRe: CreateTimerQueueTimer huge delays Pin
LunaticFringe26-Jan-10 7:42
LunaticFringe26-Jan-10 7:42 
QuestionHow to insert seperators in Toolbar (MFC CS 2005) Pin
Software200726-Jan-10 6:14
Software200726-Jan-10 6:14 
AnswerRe: How to insert seperators in Toolbar (MFC CS 2005) Pin
Maximilien26-Jan-10 6:21
Maximilien26-Jan-10 6:21 
GeneralRe: How to insert seperators in Toolbar (MFC CS 2005) Pin
Software200726-Jan-10 6:45
Software200726-Jan-10 6:45 
GeneralRe: How to insert seperators in Toolbar (MFC CS 2005) Pin
Maximilien26-Jan-10 6:53
Maximilien26-Jan-10 6:53 
GeneralRe: How to insert seperators in Toolbar (MFC CS 2005) Pin
Software200726-Jan-10 6:55
Software200726-Jan-10 6:55 
QuestionHow to load 2 tool bars in Main Frame (MFC) Pin
Software200726-Jan-10 4:49
Software200726-Jan-10 4:49 
QuestionRe: How to load 2 tool bars in Main Frame (MFC) Pin
Maximilien26-Jan-10 5:05
Maximilien26-Jan-10 5:05 
AnswerRe: How to load 2 tool bars in Main Frame (MFC) Pin
Software200726-Jan-10 5:15
Software200726-Jan-10 5:15 

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.