Click here to Skip to main content
15,892,537 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Please don't be rude Pin
CPallini10-Feb-09 23:05
mveCPallini10-Feb-09 23:05 
Questioncreating app buttons Pin
uzziah010-Feb-09 16:09
uzziah010-Feb-09 16:09 
Questiondisable end program notification in console application Pin
Arif Liminto10-Feb-09 14:53
professionalArif Liminto10-Feb-09 14:53 
AnswerRe: disable end program notification in console application Pin
Eytukan10-Feb-09 16:18
Eytukan10-Feb-09 16:18 
GeneralRe: disable end program notification in console application Pin
Arif Liminto10-Feb-09 16:27
professionalArif Liminto10-Feb-09 16:27 
GeneralRe: disable end program notification in console application Pin
Eytukan10-Feb-09 16:30
Eytukan10-Feb-09 16:30 
GeneralRe: disable end program notification in console application Pin
Arif Liminto10-Feb-09 17:50
professionalArif Liminto10-Feb-09 17:50 
Questionreturn in catch block Pin
clawton10-Feb-09 11:06
clawton10-Feb-09 11:06 
Are there any rules of thumb, guidelines, issues with, etc... about having a return in a catch block?
For example:

try {
// Some code...
} catch (std::exception &) {
// log error
return -1;
}

Also try this test using VC with VS 2005 SP1 (Microsoft Visual C++ 2005 77626-009-0000007-41138)
1) Create standard MFC dialog based application
2) Add new method with signature: int foo();
3) in foo add the following code:

std::vector<int> v;

try {
v.push_back(1);
} catch (std::exception &;) {
return 1;
}

// Just some code that does something...
if (v.size()) {

}

return 0;
4) Step through the code in debugger. On several systems, I see the debug statement indicator move onto the line with "return 1". The disassembly code is very strange indeed.

Any comments from the guru's out there? Smile | :)

Thanks!
AnswerRe: return in catch block Pin
Stuart Dootson10-Feb-09 11:26
professionalStuart Dootson10-Feb-09 11:26 
GeneralRe: return in catch block Pin
clawton10-Feb-09 11:32
clawton10-Feb-09 11:32 
GeneralRe: return in catch block Pin
Stuart Dootson10-Feb-09 12:10
professionalStuart Dootson10-Feb-09 12:10 
GeneralRe: return in catch block Pin
Stuart Dootson10-Feb-09 12:10
professionalStuart Dootson10-Feb-09 12:10 
GeneralRe: return in catch block Pin
Luc Pattyn10-Feb-09 15:04
sitebuilderLuc Pattyn10-Feb-09 15:04 
AnswerRe: return in catch block Pin
Eytukan10-Feb-09 16:19
Eytukan10-Feb-09 16:19 
AnswerRe: return in catch block Pin
ehaerim21-Nov-11 14:15
ehaerim21-Nov-11 14:15 
GeneralRe: return in catch block Pin
clawton21-Nov-11 17:45
clawton21-Nov-11 17:45 
QuestionResolve the IP from a MAC (ARP) Pin
thelonesquirrely10-Feb-09 10:40
thelonesquirrely10-Feb-09 10:40 
AnswerRe: Resolve the IP from a MAC (ARP) Pin
led mike10-Feb-09 11:01
led mike10-Feb-09 11:01 
GeneralRe: Resolve the IP from a MAC (ARP) Pin
thelonesquirrely10-Feb-09 11:11
thelonesquirrely10-Feb-09 11:11 
GeneralRe: Resolve the IP from a MAC (ARP) Pin
led mike10-Feb-09 11:45
led mike10-Feb-09 11:45 
GeneralRe: Resolve the MAC from an IP (ARP) Pin
thelonesquirrely10-Feb-09 11:59
thelonesquirrely10-Feb-09 11:59 
GeneralRe: Resolve the MAC from an IP (ARP) Pin
Stuart Dootson10-Feb-09 12:20
professionalStuart Dootson10-Feb-09 12:20 
Questionhow to drawline on picture box in MFC/C++? Pin
ping_jacob10-Feb-09 7:44
ping_jacob10-Feb-09 7:44 
AnswerRe: how to drawline on picture box in MFC/C++? Pin
Stuart Dootson10-Feb-09 8:06
professionalStuart Dootson10-Feb-09 8:06 
QuestionConverting Byte array to Varinat and Variant to Byte array Pin
Elsie10-Feb-09 7:23
Elsie10-Feb-09 7:23 

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.