Click here to Skip to main content
15,897,518 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: about exception specification Pin
George_George27-Jan-08 20:43
George_George27-Jan-08 20:43 
GeneralRe: about exception specification Pin
Hamid_RT27-Jan-08 20:48
Hamid_RT27-Jan-08 20:48 
GeneralRe: about exception specification Pin
George_George27-Jan-08 20:51
George_George27-Jan-08 20:51 
GeneralRe: about exception specification Pin
Hamid_RT27-Jan-08 21:08
Hamid_RT27-Jan-08 21:08 
GeneralRe: about exception specification Pin
George_George27-Jan-08 21:12
George_George27-Jan-08 21:12 
GeneralRe: about exception specification Pin
Hamid_RT28-Jan-08 2:00
Hamid_RT28-Jan-08 2:00 
GeneralRe: about exception specification Pin
George_George28-Jan-08 13:39
George_George28-Jan-08 13:39 
Generalbad_alloc in new Pin
George_George26-Jan-08 22:12
George_George26-Jan-08 22:12 
Hello everyone,


I usually check whether there is bad_alloc thrown to identify whether the allocation is success or not.

My question is,

Is there a way to disable bad_alloc and just to check the returned pointer NULL or not to identify allocation success or not -- which from function point of view, is as correct as the way to catch bad_alloc? Windows platform/Visual Studio is ok. I always see code does not check bad_alloc and just check the return pointer.

(My solution is to select Enable C++ Exception to No in Code Generation option in Visual Studio, not sure whether it is the most correct way.)


thanks in advance,
George
GeneralRe: bad_alloc in new Pin
Hamid_RT27-Jan-08 20:37
Hamid_RT27-Jan-08 20:37 
GeneralRe: bad_alloc in new Pin
George_George27-Jan-08 20:47
George_George27-Jan-08 20:47 
QuestionHow do you put a "FLOAT" number into a dialog's editbox? Pin
Larry Mills Sr26-Jan-08 11:32
Larry Mills Sr26-Jan-08 11:32 
AnswerRe: How do you put a "FLOAT" number into a dialog's editbox? Pin
PJ Arends26-Jan-08 20:12
professionalPJ Arends26-Jan-08 20:12 
GeneralRe: How do you put a "FLOAT" number into a dialog's editbox? Pin
Larry Mills Sr30-Jan-08 8:18
Larry Mills Sr30-Jan-08 8:18 
AnswerRe: How do you put a "FLOAT" number into a dialog's editbox? Pin
Hamid_RT27-Jan-08 20:35
Hamid_RT27-Jan-08 20:35 
GeneralOpenUrl() with PostData Question Pin
Lucky the code machine26-Jan-08 9:13
Lucky the code machine26-Jan-08 9:13 
GeneralAdding items to a list box in a dialog. [modified] Pin
Ben Aldhouse26-Jan-08 4:30
Ben Aldhouse26-Jan-08 4:30 
QuestionRe: Adding items to a list box in a dialog. Pin
CPallini26-Jan-08 5:00
mveCPallini26-Jan-08 5:00 
GeneralRe: Adding items to a list box in a dialog. Pin
Ben Aldhouse26-Jan-08 5:55
Ben Aldhouse26-Jan-08 5:55 
GeneralRe: Adding items to a list box in a dialog. Pin
CPallini26-Jan-08 6:14
mveCPallini26-Jan-08 6:14 
GeneralRe: Adding items to a list box in a dialog. Pin
Ben Aldhouse26-Jan-08 6:15
Ben Aldhouse26-Jan-08 6:15 
GeneralRe: Adding items to a list box in a dialog. Pin
Ben Aldhouse26-Jan-08 6:14
Ben Aldhouse26-Jan-08 6:14 
GeneralHooking Pin
dellthinker26-Jan-08 0:33
dellthinker26-Jan-08 0:33 
GeneralRe: Hooking Pin
CPallini26-Jan-08 2:07
mveCPallini26-Jan-08 2:07 
GeneralRe: Hooking Pin
Nitheesh George27-Jan-08 19:14
Nitheesh George27-Jan-08 19:14 
GeneralRe: Hooking Pin
CPallini27-Jan-08 22:22
mveCPallini27-Jan-08 22:22 

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.