Click here to Skip to main content
15,890,741 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: cant create process :( Pin
Hamid_RT2-Mar-08 4:50
Hamid_RT2-Mar-08 4:50 
QuestionForce flush of unwritten data to USB stick? Pin
Dominik Reichl2-Mar-08 0:54
Dominik Reichl2-Mar-08 0:54 
AnswerRe: Force flush of unwritten data to USB stick? Pin
dontknowitall2-Mar-08 3:39
dontknowitall2-Mar-08 3:39 
QuestionRe: Force flush of unwritten data to USB stick? Pin
Dominik Reichl2-Mar-08 4:00
Dominik Reichl2-Mar-08 4:00 
GeneralRe: Force flush of unwritten data to USB stick? Pin
dontknowitall2-Mar-08 9:00
dontknowitall2-Mar-08 9:00 
GeneralRe: Force flush of unwritten data to USB stick? Pin
Dominik Reichl2-Mar-08 9:57
Dominik Reichl2-Mar-08 9:57 
AnswerRe: Force flush of unwritten data to USB stick? Pin
JudyL_MD3-Mar-08 2:13
JudyL_MD3-Mar-08 2:13 
Generaldeque best practices Pin
George_George1-Mar-08 23:18
George_George1-Mar-08 23:18 
Hello everyone,


This is what mentioned in the book The C++ Standard Library, section 6.3 Deques,

--------------------
In summary, you should prefer a deque if the following is true:

You don't refer to elements of the container.

It is important that the container frees memory when it is no longer used (however, the standard does not guarantee that this happens).
--------------------

My confusions,

1. What means "refer to elements of the container"? We should not do that? Why -- we always refer to elements in the container? When we use iterator of deque to acccess elements in deque container, we always refer to elements of container, right? What does the author mean?

2. I think whether deque container implementation actually free the memory when we do erase or pop or just mark it as freed to reserve for future use (e.g. insert or push) is up to implementation details, does this point to be a reason why we use deque? Confused.


thanks in advance,
George
GeneralRe: deque best practices Pin
Chris Losinger2-Mar-08 5:15
professionalChris Losinger2-Mar-08 5:15 
GeneralRe: deque best practices Pin
George_George2-Mar-08 14:09
George_George2-Mar-08 14:09 
GeneralRe: deque best practices Pin
Chris Losinger2-Mar-08 14:12
professionalChris Losinger2-Mar-08 14:12 
GeneralRe: deque best practices Pin
George_George2-Mar-08 14:51
George_George2-Mar-08 14:51 
GeneralRe: deque best practices Pin
Chris Losinger2-Mar-08 15:02
professionalChris Losinger2-Mar-08 15:02 
GeneralRe: deque best practices Pin
George_George2-Mar-08 15:13
George_George2-Mar-08 15:13 
Generaltypedef struct problem Pin
gentleguy1-Mar-08 22:21
gentleguy1-Mar-08 22:21 
GeneralRe: typedef struct problem Pin
Gary R. Wheeler2-Mar-08 1:04
Gary R. Wheeler2-Mar-08 1:04 
GeneralRe: typedef struct problem Pin
gentleguy2-Mar-08 15:52
gentleguy2-Mar-08 15:52 
GeneralRe: typedef struct problem Pin
Gary R. Wheeler3-Mar-08 11:18
Gary R. Wheeler3-Mar-08 11:18 
Generalsize and iterator of deque Pin
George_George1-Mar-08 20:43
George_George1-Mar-08 20:43 
GeneralRe: size and iterator of deque Pin
markkuk1-Mar-08 22:10
markkuk1-Mar-08 22:10 
GeneralRe: size and iterator of deque Pin
George_George1-Mar-08 22:50
George_George1-Mar-08 22:50 
Generalrandom access iterator Pin
George_George1-Mar-08 20:33
George_George1-Mar-08 20:33 
GeneralRe: random access iterator Pin
Stephen Hewitt2-Mar-08 12:44
Stephen Hewitt2-Mar-08 12:44 
GeneralRe: random access iterator Pin
George_George2-Mar-08 14:09
George_George2-Mar-08 14:09 
Questioncreating windows services using MFC\c++ Pin
AmitCohen2221-Mar-08 19:13
AmitCohen2221-Mar-08 19:13 

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.