Click here to Skip to main content
15,917,328 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDisabling a specific column in Flexgrid Pin
sunny_vc27-Apr-08 20:49
sunny_vc27-Apr-08 20:49 
GeneralRe: Disabling a specific column in Flexgrid Pin
chandu00427-Apr-08 23:04
chandu00427-Apr-08 23:04 
QuestionHow to catch a 'new' exception? (with code) Pin
followait27-Apr-08 18:58
followait27-Apr-08 18:58 
AnswerRe: How to catch a 'new' exception? (with code) Pin
Saurabh.Garg27-Apr-08 19:23
Saurabh.Garg27-Apr-08 19:23 
GeneralRe: How to catch a 'new' exception? (with code) Pin
Rajkumar R27-Apr-08 20:46
Rajkumar R27-Apr-08 20:46 
GeneralRe: How to catch a 'new' exception? (with code) Pin
Saurabh.Garg28-Apr-08 16:54
Saurabh.Garg28-Apr-08 16:54 
GeneralRe: How to catch a 'new' exception? (with code) Pin
Rajkumar R28-Apr-08 19:02
Rajkumar R28-Apr-08 19:02 
AnswerRe: How to catch a 'new' exception? (with code) Pin
Rajkumar R27-Apr-08 20:44
Rajkumar R27-Apr-08 20:44 
I think the exception is not at the point of allocation (new statement), but at the statement where the pointer(which is null pointer because of allocation failure) is dereferenced, try commenting the dereferencing part of the code and check.

Or try the debug build as I think you are using release build and you didn't find the debug assertion before the exception.


followait wrote:
byte *p=new byte[-1]


possibly you are using VS6.0, later version shows "error C2148: total size of array must not exceed 0x7fffffff bytes" you cannot pass larger size directly but you can indirectly by variable. Newer version throws exception that can be caught with your code.
GeneralPostMessage Pin
john563227-Apr-08 18:40
john563227-Apr-08 18:40 
GeneralRe: PostMessage Pin
Saurabh.Garg27-Apr-08 19:00
Saurabh.Garg27-Apr-08 19:00 
GeneralRe: PostMessage Pin
john563227-Apr-08 19:18
john563227-Apr-08 19:18 
GeneralRe: PostMessage Pin
Saurabh.Garg27-Apr-08 19:26
Saurabh.Garg27-Apr-08 19:26 
GeneralRe: PostMessage Pin
Saurabh.Garg27-Apr-08 19:28
Saurabh.Garg27-Apr-08 19:28 
GeneralRe: PostMessage Pin
john563227-Apr-08 19:40
john563227-Apr-08 19:40 
GeneralRe: PostMessage Pin
Saurabh.Garg27-Apr-08 20:05
Saurabh.Garg27-Apr-08 20:05 
GeneralRe: PostMessage Pin
john563227-Apr-08 20:43
john563227-Apr-08 20:43 
GeneralRe: PostMessage Pin
Saurabh.Garg27-Apr-08 20:45
Saurabh.Garg27-Apr-08 20:45 
GeneralRe: PostMessage Pin
john563227-Apr-08 20:58
john563227-Apr-08 20:58 
GeneralRe: PostMessage Pin
Saurabh.Garg27-Apr-08 21:03
Saurabh.Garg27-Apr-08 21:03 
GeneralRe: PostMessage Pin
john563227-Apr-08 21:09
john563227-Apr-08 21:09 
QuestionRe: PostMessage Pin
Rajkumar R27-Apr-08 21:38
Rajkumar R27-Apr-08 21:38 
GeneralRe: PostMessage Pin
john563227-Apr-08 22:08
john563227-Apr-08 22:08 
QuestionRe: PostMessage Pin
Rajkumar R27-Apr-08 22:53
Rajkumar R27-Apr-08 22:53 
GeneralRe: PostMessage Pin
john563228-Apr-08 0:03
john563228-Apr-08 0:03 
GeneralRe: PostMessage Pin
Rajkumar R28-Apr-08 5:27
Rajkumar R28-Apr-08 5:27 

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.