can anyone teach how to use this try and catch function ???
can anyone teach how to use this try and catch function ???
thanks
but i dunno wat is the webby trying to say
a) Instead of saying "webby", please say "web site".
b) Does "mi" mean "me"?
c) Did you start out learning Dos stuff (the basics), or did you go straight for MFC?
d) If not, try buying "Sam's Teach Yourself C++ in 21 Days" (it's a book)
e) Try researching some stuff yourself from that book
f) Try researching the rest of the stuff on your own from the internet. A lot of this stuff you could have figured out on your own.
g) If that doesn't work, try taking lessons.
h) If none of this works, THEN go for the C board.
i) If you have trouble understanding replies on the C board, find out how old you are. If you are under 11 years old, then you should probably wait until you are that old before learning C++.
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
Ditto on the language.
It just limits your chance of a response.
Code:__try { //what ever you want to catch exceptions on } __except(1)//EXCEPTION_EXECUTE_HANDLER known exception so use this code to handle it { sprintf(sBuffer,"App has caused exception %08X. app may need to be restarted.",_exception_code()); MessageBox(hWnd,sBuffer,"App Error",MB_ICONERROR); }
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
Code:int x = 10, y = -20; try { x = ~x++; y = ~y if( x != -10 ) throw( "Failed to switch X" ); if( y != 20 ) throw( "Failed to switch Y" ); cout << "X = " << x << endl; cout << "Y = " << y << endl; } catch( const char *msg ) { MessageBox(NULL, msg, "Exception", NULL); }
"...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers