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

C / C++ / MFC

 
GeneralRe: Which is faster... Pin
rocky_pulley20-May-05 16:51
rocky_pulley20-May-05 16:51 
GeneralRe: Which is faster... Pin
NeverFall20-May-05 18:31
NeverFall20-May-05 18:31 
GeneralRe: Which is faster... Pin
peterchen21-May-05 11:27
peterchen21-May-05 11:27 
GeneralRe: Which is faster... Pin
Alexander M.,21-May-05 12:59
Alexander M.,21-May-05 12:59 
GeneralRe: Which is faster... Pin
Tom Archer20-May-05 16:54
Tom Archer20-May-05 16:54 
GeneralUncaught Exceptions Pin
shawnf2220-May-05 12:23
shawnf2220-May-05 12:23 
GeneralRe: Uncaught Exceptions Pin
Kevin McFarlane20-May-05 12:59
Kevin McFarlane20-May-05 12:59 
GeneralRe: Uncaught Exceptions Pin
liquid_20-May-05 21:24
liquid_20-May-05 21:24 
In fact, the question is: should I care exceptions and, if so, in what
situations. Your example with using operator new is simple to
explain. The MSDN documentation gives the following description:
If there is insufficient memory for the allocation request, by default
operator new returns NULL. You can change this default behavior by writing a
custom exception-handling routine and calling the _set_new_handler run-time
library function with your function name as its argument.

In way shown above, new does not throw an exception by default on
insufficient memory. I would suspect that DEBUG version of the library sets
he new handler which throws one.
Anyway, using operator new you still hav control on what it returns.
There are, though, routines which does not return anything, just
void. Here, you have no control on what happens while executing
that routine and exception is the only way you can check whether the desired
action was done.
Besides what I said above, exceptions give you, as a developer, more
flexibility on handling of wider spectrum of undesired situation in designed
software than you could have based on return values.
That's my point of view.
GeneralRe: Uncaught Exceptions Pin
Tim Smith22-May-05 3:58
Tim Smith22-May-05 3:58 
GeneralRe: Uncaught Exceptions Pin
S. Senthil Kumar21-May-05 0:40
S. Senthil Kumar21-May-05 0:40 
QuestionHow to Add Data to a dataset and write to an xml file Pin
Mikan2320-May-05 11:02
Mikan2320-May-05 11:02 
Generaldll problem for mIRC.. Pin
da^hype20-May-05 10:56
da^hype20-May-05 10:56 
GeneralChanging Display Options for Windows Taskbar Pin
wes21420-May-05 8:26
wes21420-May-05 8:26 
GeneralVS2005 - Disabling warning (project-wide) Pin
dandy7220-May-05 7:45
dandy7220-May-05 7:45 
GeneralRe: VS2005 - Disabling warning (project-wide) Pin
PJ Arends20-May-05 8:09
professionalPJ Arends20-May-05 8:09 
GeneralRe: VS2005 - Disabling warning (project-wide) Pin
dandy7220-May-05 8:35
dandy7220-May-05 8:35 
GeneralRe: VS2005 - Disabling warning (project-wide) Pin
David Crow20-May-05 8:35
David Crow20-May-05 8:35 
GeneralRe: VS2005 - Disabling warning (project-wide) Pin
Bob Stanneveld20-May-05 10:01
Bob Stanneveld20-May-05 10:01 
GeneralRe: VS2005 - Disabling warning (project-wide) Pin
dandy7220-May-05 10:17
dandy7220-May-05 10:17 
GeneralRunning Multiple Instances of a Static Library Pin
Islamax20-May-05 6:30
Islamax20-May-05 6:30 
GeneralRe: Running Multiple Instances of a Static Library Pin
Chris Losinger20-May-05 8:44
professionalChris Losinger20-May-05 8:44 
GeneralRe: Running Multiple Instances of a Static Library Pin
Islamax20-May-05 17:40
Islamax20-May-05 17:40 
GeneralRe: Running Multiple Instances of a Static Library Pin
doublebug21-May-05 1:43
doublebug21-May-05 1:43 
Questionhow to change font while printing in MFC Pin
Member 94878020-May-05 5:31
Member 94878020-May-05 5:31 
AnswerRe: how to change font while printing in MFC Pin
lynchspawn20-May-05 7:08
lynchspawn20-May-05 7:08 

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.