Click here to Skip to main content
15,917,608 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How can set the Value of Edit Box? Pin
Hamid_RT11-May-08 23:28
Hamid_RT11-May-08 23:28 
AnswerRe: How can set the Value of Edit Box? Pin
Yajnesh Narayan Behera11-May-08 22:39
Yajnesh Narayan Behera11-May-08 22:39 
GeneralRe: How can set the Value of Edit Box? Pin
Le@rner11-May-08 23:12
Le@rner11-May-08 23:12 
GeneralRe: How can set the Value of Edit Box? Pin
Yajnesh Narayan Behera12-May-08 1:55
Yajnesh Narayan Behera12-May-08 1:55 
GeneralRe: How can set the Value of Edit Box? Pin
Rajesh R Subramanian12-May-08 0:54
professionalRajesh R Subramanian12-May-08 0:54 
Questionpublic & protect question Pin
followait11-May-08 21:37
followait11-May-08 21:37 
AnswerRe: public & protect question Pin
CPallini11-May-08 21:48
mveCPallini11-May-08 21:48 
GeneralRe: public & protect question Pin
followait11-May-08 22:11
followait11-May-08 22:11 
Here is the code.
Though
D::~D()
is protected, it works just like public, any differece?

#include <iostream>
#include <assert.h>

using namespace std;

class B
{
public:
	B(){v();}
	virtual ~B() {
		assert(false);
		int j=0;
		++j;
	}
	virtual void v(){cout<<"B"<<endl;}
private:
};

class D : public B
{
public:
	D(){v();}
protected:
	~D() {
		assert(false);
		int i=0;
		++i;
	};
	virtual void v(){cout<<"D"<<endl;}
private:
};

int main()
{
	B *p=new D;
	delete p;

	return 0;
}

GeneralRe: public & protect question Pin
CPallini11-May-08 22:31
mveCPallini11-May-08 22:31 
GeneralRe: public & protect question Pin
C.P.Rajesh11-May-08 23:21
C.P.Rajesh11-May-08 23:21 
GeneralRe: public & protect question Pin
CPallini11-May-08 23:31
mveCPallini11-May-08 23:31 
GeneralRe: public & protect question Pin
C.P.Rajesh11-May-08 23:39
C.P.Rajesh11-May-08 23:39 
GeneralRe: public & protect question Pin
CPallini11-May-08 23:55
mveCPallini11-May-08 23:55 
GeneralRe: public & protect question Pin
Rajkumar R11-May-08 23:36
Rajkumar R11-May-08 23:36 
AnswerRe: public & protect question Pin
Naveen11-May-08 21:49
Naveen11-May-08 21:49 
QuestionRe: public & protect question Pin
Rajkumar R11-May-08 21:51
Rajkumar R11-May-08 21:51 
AnswerRe: public & protect question Pin
followait11-May-08 22:19
followait11-May-08 22:19 
GeneralRe: public & protect question Pin
Rajkumar R11-May-08 22:24
Rajkumar R11-May-08 22:24 
QuestionWhich message the Windows sent indication the creation of a new file to Explorer windows Pin
Nitheesh George11-May-08 21:36
Nitheesh George11-May-08 21:36 
AnswerRe: Which message the Windows sent indication the creation of a new file to Explorer windows Pin
Naveen11-May-08 21:45
Naveen11-May-08 21:45 
GeneralRe: Which message the Windows sent indication the creation of a new file to Explorer windows Pin
Nitheesh George11-May-08 22:18
Nitheesh George11-May-08 22:18 
QuestionClass ProtoType Pin
dehseth11-May-08 21:30
dehseth11-May-08 21:30 
QuestionRe: Class ProtoType Pin
CPallini11-May-08 21:41
mveCPallini11-May-08 21:41 
AnswerRe: Class ProtoType Pin
dehseth11-May-08 22:23
dehseth11-May-08 22:23 
GeneralRe: Class ProtoType Pin
CPallini11-May-08 22:50
mveCPallini11-May-08 22:50 

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.