Click here to Skip to main content
16,004,507 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Combo heigth problem Pin
Ed Gadziemski1-Oct-02 4:06
professionalEd Gadziemski1-Oct-02 4:06 
GeneralRe: Combo heigth problem Pin
Jose Cruz1-Oct-02 5:16
Jose Cruz1-Oct-02 5:16 
QuestionSTL reference? Pin
User 988527-Sep-02 6:53
User 988527-Sep-02 6:53 
AnswerRe: STL reference? Pin
RedZenBird27-Sep-02 8:18
RedZenBird27-Sep-02 8:18 
Generalatl full control Pin
Anonymous23-Sep-02 18:05
Anonymous23-Sep-02 18:05 
GeneralRe: atl full control Pin
Todd Smith24-Sep-02 7:03
Todd Smith24-Sep-02 7:03 
GeneralRe: atl full control Pin
Jörgen Sigvardsson3-Oct-02 14:28
Jörgen Sigvardsson3-Oct-02 14:28 
QuestionHow to do this properly with STL? Pin
Mark Tutt23-Sep-02 3:49
Mark Tutt23-Sep-02 3:49 
I've come across an interesting problem, that I can't find a nice clean solution to.

The problem is how to manage adding and deleting objects from two vectors containing different objects.

Here's what I've got: A list of objects that contain an vector of ints as data points. The object holding the list has an vector of description objects containing information about each of the ints in the vector. They have a one to one relationship.

Now, I need to support adding or removing data points. What I can't figure out how to do is how to do this without a lot of overhead. My first thought was that I'd simply get the position of the data point description object that was added, then simply do a for_each over the list and call insert or erase for the appropriate position in the data points vector as required by the operation. Unfortunately both of those functions require an iterator to the item being erased, or the position the new item is being inserted at, not just it's index position.

Is there a way to do this without iterating over each data point vector? Since the position in the vector is going to be the same for all the objects, it seems like there should be a way to do this without all the manipulation.

Any ideas?
AnswerRe: How to do this properly with STL? Pin
Joao Vaz23-Sep-02 4:02
Joao Vaz23-Sep-02 4:02 
GeneralRe: How to do this properly with STL? Pin
Mark Tutt23-Sep-02 4:14
Mark Tutt23-Sep-02 4:14 
GeneralRe: How to do this properly with STL? Pin
Joao Vaz23-Sep-02 6:17
Joao Vaz23-Sep-02 6:17 
GeneralRe: How to do this properly with STL? Pin
Mark Tutt23-Sep-02 15:52
Mark Tutt23-Sep-02 15:52 
AnswerRe: How to do this properly with STL? Pin
Joaquín M López Muñoz23-Sep-02 9:09
Joaquín M López Muñoz23-Sep-02 9:09 
GeneralRe: How to do this properly with STL? Pin
Mark Tutt23-Sep-02 10:41
Mark Tutt23-Sep-02 10:41 
GeneralRe: How to do this properly with STL? Pin
Joao Vaz23-Sep-02 21:08
Joao Vaz23-Sep-02 21:08 
GeneralOLEDB (CCommand) Problem Pin
ramjan23-Sep-02 0:22
ramjan23-Sep-02 0:22 
GeneralRe: OLEDB (CCommand) Problem Pin
Steve S24-Sep-02 0:38
Steve S24-Sep-02 0:38 
GeneralUse Vc dll in delphi Pin
Mazdak22-Sep-02 3:57
Mazdak22-Sep-02 3:57 
GeneralRe: Use Vc dll in delphi Pin
Alexandru Savescu24-Sep-02 0:22
Alexandru Savescu24-Sep-02 0:22 
GeneralMaybe lame question ... Pin
Mandalay18-Sep-02 5:50
Mandalay18-Sep-02 5:50 
GeneralRe: Maybe lame question ... Pin
Michael Dunn18-Sep-02 7:08
sitebuilderMichael Dunn18-Sep-02 7:08 
GeneralRe: Maybe lame question ... Pin
Ed Gadziemski20-Sep-02 10:50
professionalEd Gadziemski20-Sep-02 10:50 
QuestionNew to DCOM & ATL? Pin
srinivasa chary18-Sep-02 3:09
srinivasa chary18-Sep-02 3:09 
AnswerRe: New to DCOM & ATL? Pin
Paul M Watt18-Sep-02 5:16
mentorPaul M Watt18-Sep-02 5:16 
GeneralRe: New to DCOM & ATL? Pin
srinivasa chary18-Sep-02 19:45
srinivasa chary18-Sep-02 19:45 

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.