Click here to Skip to main content
15,927,514 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: AfxGetApp NULL pointer issue Pin
Mark Salsbery27-May-07 10:32
Mark Salsbery27-May-07 10:32 
GeneralRe: AfxGetApp NULL pointer issue Pin
Abyss27-May-07 18:48
Abyss27-May-07 18:48 
GeneralRe: AfxGetApp NULL pointer issue Pin
Abyss27-May-07 20:15
Abyss27-May-07 20:15 
GeneralRe: AfxGetApp NULL pointer issue Pin
Mark Salsbery28-May-07 6:10
Mark Salsbery28-May-07 6:10 
QuestionCallback help needed Pin
Thomas Andersen27-May-07 5:44
Thomas Andersen27-May-07 5:44 
AnswerRe: Callback help needed [modified] Pin
Richard Andrew x6427-May-07 7:24
professionalRichard Andrew x6427-May-07 7:24 
Questionvector::erase() Pin
C_Zealot27-May-07 1:02
C_Zealot27-May-07 1:02 
AnswerRe: vector::erase() Pin
Cedric Moonen27-May-07 1:16
Cedric Moonen27-May-07 1:16 
When you call erase, it will invalidate your current iterator and all iterators that follow. Thus, when you erase something and try to increment this same iterator, this will cause an exception. The erase function returns an iterator to the next valid element, you need to use that.

Try to change your code to something like this:
while (it != list.end())<br />
{<br />
   if (*it<0)<br />
   {<br />
      it = erase(it);<br />
   }<br />
   else<br />
      it++;<br />
}




Cédric Moonen
Software developer

Charting control [v1.2]

GeneralRe: vector::erase() Pin
C_Zealot27-May-07 1:21
C_Zealot27-May-07 1:21 
AnswerRe: vector::erase() Pin
Garth J Lancaster27-May-07 1:28
professionalGarth J Lancaster27-May-07 1:28 
GeneralRe: vector::erase() Pin
C_Zealot27-May-07 1:30
C_Zealot27-May-07 1:30 
Questionhow to call a dialog in DLL containing Active X - Date Time Picker Pin
prashant pissey27-May-07 0:37
prashant pissey27-May-07 0:37 
AnswerRe: how to call a dialog in DLL containing Active X - Date Time Picker Pin
Naveen27-May-07 14:19
Naveen27-May-07 14:19 
GeneralRe: how to call a dialog in DLL containing Active X - Date Time Picker Pin
prashant pissey27-May-07 17:37
prashant pissey27-May-07 17:37 
GeneralRe: how to call a dialog in DLL containing Active X - Date Time Picker Pin
Naveen27-May-07 17:50
Naveen27-May-07 17:50 
GeneralRe: how to call a dialog in DLL containing Active X - Date Time Picker Pin
prashant pissey27-May-07 18:25
prashant pissey27-May-07 18:25 
GeneralRe: how to call a dialog in DLL containing Active X - Date Time Picker Pin
Naveen27-May-07 18:29
Naveen27-May-07 18:29 
GeneralRe: how to call a dialog in DLL containing Active X - Date Time Picker Pin
prashant pissey27-May-07 18:39
prashant pissey27-May-07 18:39 
GeneralRe: how to call a dialog in DLL containing Active X - Date Time Picker Pin
Naveen27-May-07 19:02
Naveen27-May-07 19:02 
GeneralRe: how to call a dialog in DLL containing Active X - Date Time Picker Pin
prashant pissey28-May-07 20:20
prashant pissey28-May-07 20:20 
GeneralRe: how to call a dialog in DLL containing Active X - Date Time Picker Pin
Naveen28-May-07 20:22
Naveen28-May-07 20:22 
GeneralRe: how to call a dialog in DLL containing Active X - Date Time Picker Pin
prashant pissey28-May-07 22:32
prashant pissey28-May-07 22:32 
QuestionActive Accessibilty, getting Font properties Pin
avirib27-May-07 0:14
avirib27-May-07 0:14 
QuestionBmp Pin
dodoxor26-May-07 23:01
dodoxor26-May-07 23:01 
AnswerRe: Bmp Pin
Mark Salsbery27-May-07 10:24
Mark Salsbery27-May-07 10:24 

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.