Click here to Skip to main content
16,006,006 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Not catching the exception Pin
Code-o-mat28-May-10 0:05
Code-o-mat28-May-10 0:05 
AnswerRe: Not catching the exception Pin
sashoalm27-May-10 22:33
sashoalm27-May-10 22:33 
GeneralRe: Not catching the exception Pin
Aescleal27-May-10 22:43
Aescleal27-May-10 22:43 
GeneralRe: Not catching the exception Pin
gsainath4u27-May-10 22:59
gsainath4u27-May-10 22:59 
AnswerRe: Not catching the exception Pin
Stephen Hewitt28-May-10 0:08
Stephen Hewitt28-May-10 0:08 
GeneralRe: Not catching the exception Pin
gsainath4u28-May-10 0:28
gsainath4u28-May-10 0:28 
GeneralRe: Not catching the exception Pin
Emilio Garavaglia28-May-10 2:04
Emilio Garavaglia28-May-10 2:04 
GeneralRe: Not catching the exception Pin
sashoalm28-May-10 2:21
sashoalm28-May-10 2:21 
The problem is that an access violation isn't error reporting - it means that your program has memory corruption. There is a difference. An access violation ALWAYS means that your code isn't well done. You should simply change your code to avoid an access violation occurring at all. Fix your code. Debug your program, find where you access the NULL pointer, and put something like this:
if (ptr) {
  ptr->szID;
}
else
  throw std::exception("The pointer is NULL!");

If you really want exceptions, that's the way you do it. An exception is something you "throw". An access violation isn't an exception - it's a crash.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal

GeneralRe: Not catching the exception Pin
Stephen Hewitt28-May-10 5:08
Stephen Hewitt28-May-10 5:08 
QuestionResizing image Pin
learningvisualc27-May-10 20:48
learningvisualc27-May-10 20:48 
AnswerRe: Resizing image Pin
Code-o-mat27-May-10 21:21
Code-o-mat27-May-10 21:21 
AnswerRe: Resizing image Pin
CPallini27-May-10 21:31
mveCPallini27-May-10 21:31 
AnswerRe: Resizing image Pin
Anu Koshy1-Jun-10 23:35
Anu Koshy1-Jun-10 23:35 
QuestionCompiling C programs in VS.NET 2005 Pin
Sadheesh R27-May-10 20:13
Sadheesh R27-May-10 20:13 
AnswerRe: Compiling C programs in VS.NET 2005 Pin
Cedric Moonen27-May-10 20:21
Cedric Moonen27-May-10 20:21 
AnswerRe: Compiling C programs in VS.NET 2005 Pin
Aescleal27-May-10 20:56
Aescleal27-May-10 20:56 
GeneralRe: Compiling C programs in VS.NET 2005 Pin
Sadheesh R27-May-10 22:47
Sadheesh R27-May-10 22:47 
GeneralRe: Compiling C programs in VS.NET 2005 Pin
Aescleal27-May-10 23:20
Aescleal27-May-10 23:20 
GeneralRe: Compiling C programs in VS.NET 2005 Pin
Sadheesh R27-May-10 23:37
Sadheesh R27-May-10 23:37 
GeneralRe: Compiling C programs in VS.NET 2005 Pin
Aescleal27-May-10 23:43
Aescleal27-May-10 23:43 
QuestionEdit Selection Color Pin
john563227-May-10 19:38
john563227-May-10 19:38 
AnswerRe: Edit Selection Color Pin
john563228-May-10 2:09
john563228-May-10 2:09 
QuestionHow to save unicode text in the source code of vc++ 6.0 IDE Pin
Jayapal Chandran27-May-10 19:07
Jayapal Chandran27-May-10 19:07 
AnswerRe: How to save unicode text in the source code of vc++ 6.0 IDE Pin
Stephen Hewitt27-May-10 19:37
Stephen Hewitt27-May-10 19:37 
GeneralRe: How to save unicode text in the source code of vc++ 6.0 IDE Pin
Jayapal Chandran28-May-10 8:42
Jayapal Chandran28-May-10 8:42 

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.