Click here to Skip to main content
15,914,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CHttpFile::ReadString Pin
Winston,Dang4-Jul-01 16:04
Winston,Dang4-Jul-01 16:04 
GeneralRe: CHttpFile::ReadString Pin
Winston,Dang5-Jul-01 23:29
Winston,Dang5-Jul-01 23:29 
Generalsmart pointer Pin
Gérald Mercet3-Jul-01 23:39
Gérald Mercet3-Jul-01 23:39 
GeneralRe: smart pointer Pin
Tomasz Sowinski4-Jul-01 0:05
Tomasz Sowinski4-Jul-01 0:05 
GeneralRe: smart pointer Pin
Erik Thompson4-Jul-01 7:36
sitebuilderErik Thompson4-Jul-01 7:36 
GeneralGrid and Databases in VC. Pin
Daniel Visan3-Jul-01 23:13
Daniel Visan3-Jul-01 23:13 
GeneralRe: Grid and Databases in VC. Pin
4-Jul-01 1:33
suss4-Jul-01 1:33 
GeneralProblem with throwing class objects Pin
Malcolm McMahon3-Jul-01 22:47
Malcolm McMahon3-Jul-01 22:47 
I seem to have stubled across my second bug (in about 8 hours worth of using this compiler).

Now, I've always used what I believed to be the standard way of throwing class exceptions (as shown in Stroustrup):

<br />
class AWobbley {<br />
char *m_msg;<br />
public:<br />
      AWobbley(const char *msg);<br />
...<br />
<br />
};<br />
<br />
...<br />
<br />
throw AWobbley("AGHRR!");<br />
...<br />
<br />
catch (AWobbley &e) {<br />
  ... do something with e.m_msg<br />
  }<br />
<br />


The problem came up when the exception class stored a dynamically constructed message and, thus, needed a destructor to delete it. In VC++ this destructor is called before the exception handler is entered. This, of course, completely messes up the whole technique.Mad | :mad:

I haven't yet found a bug report on the Microsoft site. Anyone else with this problem?

Yes, of course there are work arrounds like passing a pointer to a newed object and deleting it at the bottom of the exception handler, but it's ugly and something I wouldn't want to keep for another compiler.
GeneralRe: Problem with throwing class objects Pin
Tomasz Sowinski3-Jul-01 23:54
Tomasz Sowinski3-Jul-01 23:54 
GeneralRe: Problem with throwing class objects Pin
Malcolm McMahon4-Jul-01 0:18
Malcolm McMahon4-Jul-01 0:18 
GeneralRe: Problem with throwing class objects Pin
Tomasz Sowinski4-Jul-01 0:35
Tomasz Sowinski4-Jul-01 0:35 
GeneralTHE STRANGEST WM_TIMER ISSUE (only for gurus) Pin
Daniel Visan3-Jul-01 22:41
Daniel Visan3-Jul-01 22:41 
GeneralRe: THE STRANGEST WM_TIMER ISSUE (only for gurus) Pin
Tomasz Sowinski4-Jul-01 0:17
Tomasz Sowinski4-Jul-01 0:17 
GeneralRe: THE STRANGEST WM_TIMER ISSUE (only for gurus) Pin
Daniel Visan4-Jul-01 1:31
Daniel Visan4-Jul-01 1:31 
GeneralRe: THE STRANGEST WM_TIMER ISSUE (only for gurus) Pin
Tomasz Sowinski4-Jul-01 1:51
Tomasz Sowinski4-Jul-01 1:51 
GeneralRe: THE STRANGEST WM_TIMER ISSUE (only for gurus) Pin
Daniel Visan4-Jul-01 5:22
Daniel Visan4-Jul-01 5:22 
GeneralRe: THE STRANGEST WM_TIMER ISSUE (only for gurus) Pin
Tomasz Sowinski4-Jul-01 5:48
Tomasz Sowinski4-Jul-01 5:48 
GeneralRe: THE STRANGEST WM_TIMER ISSUE (only for gurus) Pin
Justin Hallet4-Jul-01 10:04
Justin Hallet4-Jul-01 10:04 
GeneralRe: THE STRANGEST WM_TIMER ISSUE (only for gurus) Pin
Tomasz Sowinski4-Jul-01 10:24
Tomasz Sowinski4-Jul-01 10:24 
QuestionIs there a NULL for member pointers? Pin
Malcolm McMahon3-Jul-01 22:26
Malcolm McMahon3-Jul-01 22:26 
AnswerRe: Is there a NULL for member pointers? Pin
Tomasz Sowinski4-Jul-01 0:32
Tomasz Sowinski4-Jul-01 0:32 
Questionhow to set g723.1 when waveinopen Pin
3-Jul-01 22:22
suss3-Jul-01 22:22 
AnswerRe: how to set g723.1 when waveinopen Pin
4-Jul-01 23:48
suss4-Jul-01 23:48 
GeneralRe: how to set g723.1 when waveinopen Pin
hapcoer5-Jul-01 22:29
hapcoer5-Jul-01 22:29 
GeneralPOP question...(probably trivial) Pin
Darko3-Jul-01 21:56
Darko3-Jul-01 21:56 

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.