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

C / C++ / MFC

 
GeneralRe: Calling function Pin
cpvc++25-Sep-08 20:16
cpvc++25-Sep-08 20:16 
GeneralRe: Calling function Pin
Daniel Kanev25-Sep-08 23:13
Daniel Kanev25-Sep-08 23:13 
QuestionRe: Calling function Pin
David Crow26-Sep-08 2:55
David Crow26-Sep-08 2:55 
Questionimplementing a class as a linked list and checking for a postfix expression Pin
shadoweKnight25-Sep-08 15:47
shadoweKnight25-Sep-08 15:47 
QuestionRe: implementing a class as a linked list and checking for a postfix expression Pin
Joseph Marzbani25-Sep-08 20:06
Joseph Marzbani25-Sep-08 20:06 
AnswerRe: implementing a class as a linked list and checking for a postfix expression Pin
David Crow26-Sep-08 2:57
David Crow26-Sep-08 2:57 
GeneralRe: implementing a class as a linked list and checking for a postfix expression Pin
shadoweKnight30-Sep-08 14:15
shadoweKnight30-Sep-08 14:15 
QuestionProblem about deque::push_back Pin
kcynic25-Sep-08 14:19
kcynic25-Sep-08 14:19 
There is a short block of code:
<br />
1: typedef deque<int> IntDeque;<br />
2: IntDeque q;<br />
3: IntDeque::iterator it = q.begin();//or q.end()<br />
4: q.push_back(12);<br />
5: if(it==q.end()){<br />
6:   cout<<"The end of the deque."<<endl;<br />
7: }</int>


The code will crash at the 5th line because of a internal exception in STL. But i really need a iterator variable to hold a specified iterator in the deque. For example, if i want it to hold the second iterator no matter i push how many new items into the deque. But, in msdn, the comments about push_back says that, this function "Inserting the element invalidates all iterators, but no references, to existing elements". This might be the reason. I tested this code in VC6 and VC2005 and got the same error.
But, this code will work well under Linux platform.
So, i wanna know if this is a difference about the implements of STL deque between MS and Linux?
AnswerRe: Problem about deque::push_back Pin
Chris Losinger25-Sep-08 14:44
professionalChris Losinger25-Sep-08 14:44 
GeneralRe: Problem about deque::push_back Pin
kcynic25-Sep-08 15:22
kcynic25-Sep-08 15:22 
AnswerRe: Problem about deque::push_back Pin
Cedric Moonen25-Sep-08 20:06
Cedric Moonen25-Sep-08 20:06 
Questionwaiting until a window closes (or, check window's state) Pin
Green Fuze25-Sep-08 12:50
Green Fuze25-Sep-08 12:50 
AnswerRe: waiting until a window closes (or, check window's state) Pin
PJ Arends25-Sep-08 20:02
professionalPJ Arends25-Sep-08 20:02 
AnswerRe: waiting until a window closes (or, check window's state) Pin
Joseph Marzbani25-Sep-08 20:22
Joseph Marzbani25-Sep-08 20:22 
GeneralRe: waiting until a window closes (or, check window's state) Pin
Green Fuze26-Sep-08 0:42
Green Fuze26-Sep-08 0:42 
Questionscan code for F1-F12 keys Pin
emmmatty125-Sep-08 8:59
emmmatty125-Sep-08 8:59 
AnswerRe: scan code for F1-F12 keys Pin
Mark Salsbery25-Sep-08 9:26
Mark Salsbery25-Sep-08 9:26 
QuestionSetWindowPos does nothing Pin
Joschwenk66625-Sep-08 7:48
Joschwenk66625-Sep-08 7:48 
AnswerRe: SetWindowPos does nothing Pin
Mark Salsbery25-Sep-08 9:31
Mark Salsbery25-Sep-08 9:31 
GeneralRe: SetWindowPos does nothing Pin
Joschwenk66626-Sep-08 5:04
Joschwenk66626-Sep-08 5:04 
GeneralRe: SetWindowPos does nothing Pin
Mark Salsbery26-Sep-08 5:17
Mark Salsbery26-Sep-08 5:17 
GeneralRe: SetWindowPos does nothing Pin
Joschwenk66628-Sep-08 21:53
Joschwenk66628-Sep-08 21:53 
QuestionHow can I understand if a named pipe is existing? Pin
sashoalm25-Sep-08 6:30
sashoalm25-Sep-08 6:30 
AnswerRe: How can I understand if a named pipe is existing? Pin
JudyL_MD25-Sep-08 11:34
JudyL_MD25-Sep-08 11:34 
GeneralRe: How can I understand if a named pipe is existing? Pin
sashoalm25-Sep-08 12:31
sashoalm25-Sep-08 12:31 

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.