Click here to Skip to main content
15,895,799 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionInheritance issue [modified] Pin
big_denny_20029-May-06 3:22
big_denny_20029-May-06 3:22 
AnswerRe: Inheritance issue [modified] Pin
toxcct29-May-06 3:26
toxcct29-May-06 3:26 
GeneralRe: Inheritance issue [modified] Pin
big_denny_20029-May-06 3:30
big_denny_20029-May-06 3:30 
GeneralRe: Inheritance issue [modified] Pin
toxcct29-May-06 3:36
toxcct29-May-06 3:36 
GeneralRe: Inheritance issue Pin
Cedric Moonen29-May-06 3:43
Cedric Moonen29-May-06 3:43 
GeneralRe: Inheritance issue Pin
Sarath C29-May-06 3:46
Sarath C29-May-06 3:46 
GeneralRe: Inheritance issue Pin
Sarath C29-May-06 3:45
Sarath C29-May-06 3:45 
AnswerRe: Inheritance issue Pin
Sarath C29-May-06 3:38
Sarath C29-May-06 3:38 
it is not the problem with a ";"

problem is with ur try catch block;


big_denny_200 wrote:
catch (Base *pError)


u r catching a pointer to the throwing object but inside the
try block u r doing

big_denny_200 wrote:
throw Derived1(); // when I add this line I get assert


so inside the throw block do as follows

Derived1 d; // when I add this line I get assert
throw &d;

or

throw &Derived1(); // when I add this line I get assert

u can also resolve if u change the catch block to pass by value instead pass by reference

SaRath

"D on't blindly follow rules you read somewhere without verifying that it makes sense for your situation!"
GeneralRe: Inheritance issue Pin
Stephen Hewitt29-May-06 14:32
Stephen Hewitt29-May-06 14:32 
AnswerRe: Inheritance issue [modified] Pin
Stephen Hewitt29-May-06 14:37
Stephen Hewitt29-May-06 14:37 
QuestionContext Menu - Adding an Item in the Windows explorer context menu Pin
Tamal Saha29-May-06 3:11
Tamal Saha29-May-06 3:11 
AnswerRe: Context Menu - Adding an Item in the Windows explorer context menu Pin
toxcct29-May-06 3:16
toxcct29-May-06 3:16 
GeneralRe: Context Menu - Adding an Item in the Windows explorer context menu Pin
Owner drawn29-May-06 17:37
Owner drawn29-May-06 17:37 
GeneralRe: Context Menu - Adding an Item in the Windows explorer context menu Pin
toxcct29-May-06 21:22
toxcct29-May-06 21:22 
GeneralRe: Context Menu - Adding an Item in the Windows explorer context menu Pin
Owner drawn30-May-06 21:12
Owner drawn30-May-06 21:12 
GeneralRe: Context Menu - Adding an Item in the Windows explorer context menu Pin
toxcct30-May-06 21:39
toxcct30-May-06 21:39 
QuestionC++/CLI Pin
Sarath C29-May-06 3:10
Sarath C29-May-06 3:10 
AnswerRe: C++/CLI Pin
toxcct29-May-06 3:13
toxcct29-May-06 3:13 
GeneralRe: C++/CLI Pin
Sarath C29-May-06 3:22
Sarath C29-May-06 3:22 
GeneralRe: C++/CLI Pin
Sarath C29-May-06 3:30
Sarath C29-May-06 3:30 
GeneralRe: C++/CLI Pin
toxcct29-May-06 3:33
toxcct29-May-06 3:33 
QuestionHow to write the current status in some file when system shuts down with Electricity failure Pin
zahid_ash29-May-06 1:53
zahid_ash29-May-06 1:53 
AnswerRe: How to write the current status in some file when system shuts down with Electricity failure Pin
Nibu babu thomas29-May-06 2:06
Nibu babu thomas29-May-06 2:06 
AnswerRe: How to write the current status in some file when system shuts down with Electricity failure Pin
Eytukan29-May-06 2:07
Eytukan29-May-06 2:07 
GeneralRe: How to write the current status in some file when system shuts down with Electricity failure Pin
zahid_ash29-May-06 2:23
zahid_ash29-May-06 2: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.