Re: CMap
- From: Alex <Alex@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 18 Aug 2007 05:50:02 -0700
Thank you for your prompt response. I will try with this.
Do you have any sample on this application to add/removeall elements into
array in map?
Will map with vector give any performance issue? (i mean, application slow
down).
Thanks in advance.
--
Thanks & Regards,
Alex.
"David Wilkinson" wrote:
Alex wrote:.
Hi,
Requirement:
I have to display information in two windows like
First Window Info. : struct{BookId,BookName,TotalPages,TotalNoOfWeeks}
Second Window Info: struct{BookId,BookName,PrintedPages,NoOfWeek}
First window displays the book information. and second window
displays current status of that particular book. Whenever user clicks on
particular book of first window, second window will display the status of
that book from the beginning.
this is not real time example. I just tried to simulate my problem.
assume, to complete print one book - 10 weeks.First window will have only one
entry per book, and second window will have more than one entry per book.
Now, I want to choose collection classes in this scenario. But, It
should be optimal solution.
I am planning to choose CMap<BookId,BookId,CArray,CArray>. Is it
correct solution?
The first entry of CArray will be the first window information. sencond
entry onwards will be second window information.
If you have optimized solution than this, please share with me.
Thanks in advance.
Alex:
I'm not sure I understand the relationship of your map to the problem
you describe, but AFAIK it is not possible to put MFC containers (e.g.
CArray) in another container (e.g. CMap). If you use the standard
library collection classes (std::vector, std::map) you will not have
this problem (and you will not have the confusing double template
argument either).
--
David Wilkinson
Visual C++ MVP
- Follow-Ups:
- Re: CMap
- From: Giovanni Dicanio
- Re: CMap
- References:
- Re: CMap
- From: David Wilkinson
- Re: CMap
- Prev by Date: Re: CListCtrl not getting collumnheaders
- Next by Date: Re: FindIndex slow
- Previous by thread: Re: CMap
- Next by thread: Re: CMap
- Index(es):
Relevant Pages
|