Click here to Skip to main content
15,886,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: c++ compiler (64 bit) Pin
Colin Angus Mackay14-Sep-06 2:35
Colin Angus Mackay14-Sep-06 2:35 
Questioncompilation errors when including both winsock.h && Ws2tcpip.h in my .cpp file. Pin
VCSharp00713-Sep-06 23:05
VCSharp00713-Sep-06 23:05 
AnswerRe: compilation errors when including both winsock.h && Ws2tcpip.h in my .cpp file. Pin
Nibu babu thomas13-Sep-06 23:30
Nibu babu thomas13-Sep-06 23:30 
GeneralRe: compilation errors when including both winsock.h && Ws2tcpip.h in my .cpp file. Pin
VCSharp00713-Sep-06 23:46
VCSharp00713-Sep-06 23:46 
QuestionUse [ShellExecute] to open a file in COM dll shell extension, CAN'T delete file after close it Pin
rockryan13-Sep-06 23:03
rockryan13-Sep-06 23:03 
QuestionPrinting a richt text file in console Pin
MarcoNedwig13-Sep-06 22:43
MarcoNedwig13-Sep-06 22:43 
QuestionCOPY CONSTRUCTORS and VIRTUAL DESTRUCTORS Pin
Subramaniam s.V.13-Sep-06 22:38
Subramaniam s.V.13-Sep-06 22:38 
AnswerRe: COPY CONSTRUCTORS and VIRTUAL DESTRUCTORS Pin
Nyarlatotep13-Sep-06 22:53
Nyarlatotep13-Sep-06 22:53 
Virtual destructors have the same meaning of virtual methods.
Those are useful if you use a base class pointer to hold a derived class pointer.

if base class destructor is not virtual :

class A
{
public:
~A() { cout << "Class A destructor"; }
};

class B : public A
{
public:
~B() { cout << "Class B destructor"; }
};

B *Bobj = new B;
A *Aobj = Bobj;
delete Aobj;

Only the A destructor is invoked.

if you make A destructor Virtual, the destructors of derived class and base class (in this order) are invoked.


Copy constructors are used to copy an object, in these cases:

MyClass obj;
MyClass obj2(obj); // Copy constructor invoked


MyClass obj = obj2; // Copy construcotr invoked


obj = obj2, in this case the assignment operator is used ...
AnswerRe: COPY CONSTRUCTORS and VIRTUAL DESTRUCTORS Pin
toxcct13-Sep-06 22:56
toxcct13-Sep-06 22:56 
AnswerRe: COPY CONSTRUCTORS and VIRTUAL DESTRUCTORS Pin
_AnsHUMAN_ 13-Sep-06 22:57
_AnsHUMAN_ 13-Sep-06 22:57 
AnswerRe: COPY CONSTRUCTORS and VIRTUAL DESTRUCTORS Pin
Hamid_RT15-Sep-06 7:09
Hamid_RT15-Sep-06 7:09 
QuestionHow to close a pop-up menu Pin
seanru13-Sep-06 22:36
seanru13-Sep-06 22:36 
AnswerRe: How to close a pop-up menu Pin
Nibu babu thomas14-Sep-06 0:27
Nibu babu thomas14-Sep-06 0:27 
AnswerRe: How to close a pop-up menu Pin
Iain Clarke, Warrior Programmer14-Sep-06 5:20
Iain Clarke, Warrior Programmer14-Sep-06 5:20 
GeneralRe: How to close a pop-up menu Pin
seanru25-Sep-06 23:01
seanru25-Sep-06 23:01 
GeneralRe: How to close a pop-up menu Pin
Iain Clarke, Warrior Programmer26-Sep-06 6:10
Iain Clarke, Warrior Programmer26-Sep-06 6:10 
QuestionException Handling Pin
Nyarlatotep13-Sep-06 22:34
Nyarlatotep13-Sep-06 22:34 
AnswerRe: Exception Handling Pin
Naveen13-Sep-06 23:03
Naveen13-Sep-06 23:03 
QuestionHow to screen the Esc-key-pressed event for a print preview view Pin
min_2_max13-Sep-06 22:12
min_2_max13-Sep-06 22:12 
Questionrich edit control query Pin
harsha_123413-Sep-06 21:39
harsha_123413-Sep-06 21:39 
AnswerRe: rich edit control query Pin
_AnsHUMAN_ 13-Sep-06 22:09
_AnsHUMAN_ 13-Sep-06 22:09 
GeneralRe: rich edit control query Pin
harsha_123413-Sep-06 22:19
harsha_123413-Sep-06 22:19 
GeneralRe: rich edit control query [modified] Pin
_AnsHUMAN_ 13-Sep-06 22:51
_AnsHUMAN_ 13-Sep-06 22:51 
GeneralRe: rich edit control query Pin
harsha_123413-Sep-06 23:05
harsha_123413-Sep-06 23:05 
AnswerRe: rich edit control query Pin
Cedric Moonen13-Sep-06 22:14
Cedric Moonen13-Sep-06 22:14 

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.