Click here to Skip to main content
15,922,894 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionpassing reference to vector in dll function Pin
Anonymous12-Sep-05 1:15
Anonymous12-Sep-05 1:15 
AnswerRe: passing reference to vector in dll function Pin
ab8lam12-Sep-05 1:49
ab8lam12-Sep-05 1:49 
AnswerRe: passing reference to vector in dll function Pin
Nemanja Trifunovic12-Sep-05 2:17
Nemanja Trifunovic12-Sep-05 2:17 
QuestionGraphics.MeasureString word wrap problem Pin
Kramer_198212-Sep-05 1:13
Kramer_198212-Sep-05 1:13 
QuestionOutlined Font in Direct3D ? Pin
Danoo12-Sep-05 1:10
Danoo12-Sep-05 1:10 
QuestionSystem Menu in MFC -Plz Help Pin
parims12-Sep-05 0:45
parims12-Sep-05 0:45 
AnswerRe: System Menu in MFC -Plz Help Pin
toxcct12-Sep-05 0:50
toxcct12-Sep-05 0:50 
Questionwhat does the MapViewOfFile do exactly?? Pin
Anonymous12-Sep-05 0:42
Anonymous12-Sep-05 0:42 
AnswerRe: what does the MapViewOfFile do exactly?? Pin
Niklas L12-Sep-05 3:06
Niklas L12-Sep-05 3:06 
GeneralRe: what does the MapViewOfFile do exactly?? Pin
namaskaaram12-Sep-05 4:02
namaskaaram12-Sep-05 4:02 
GeneralRe: what does the MapViewOfFile do exactly?? Pin
Niklas L12-Sep-05 4:24
Niklas L12-Sep-05 4:24 
GeneralRe: what does the MapViewOfFile do exactly?? Pin
Chintoo72312-Sep-05 6:01
Chintoo72312-Sep-05 6:01 
GeneralRe: what does the MapViewOfFile do exactly?? Pin
namaskaaram12-Sep-05 17:11
namaskaaram12-Sep-05 17:11 
QuestionCreate child process Pin
whofmans12-Sep-05 0:29
whofmans12-Sep-05 0:29 
AnswerRe: Create child process Pin
David Crow12-Sep-05 3:13
David Crow12-Sep-05 3:13 
QuestionProblems with .NET double data type Pin
sirtimid12-Sep-05 0:11
sirtimid12-Sep-05 0:11 
AnswerRe: Problems with .NET double data type Pin
toxcct12-Sep-05 0:18
toxcct12-Sep-05 0:18 
GeneralRe: Problems with .NET double data type Pin
sirtimid12-Sep-05 0:42
sirtimid12-Sep-05 0:42 
GeneralRe: Problems with .NET double data type Pin
toxcct12-Sep-05 1:44
toxcct12-Sep-05 1:44 
GeneralRe: Problems with .NET double data type Pin
sirtimid12-Sep-05 21:54
sirtimid12-Sep-05 21:54 
GeneralRe: Problems with .NET double data type Pin
Maximilien12-Sep-05 3:04
Maximilien12-Sep-05 3:04 
QuestionHow to trap as soon as some Windows app of the same computer sends a print job to the network printer server? Pin
wangdave12-Sep-05 0:05
wangdave12-Sep-05 0:05 
Questionsingleton for a parent with protected destructor Pin
yccheok12-Sep-05 0:02
yccheok12-Sep-05 0:02 
hello, in a singleton design, i trying to make my parent class having protected constructor and destructor. however, the compiler give me error when my child, trying to delete itself through parent pointer.

isn't child should have access to parent protected destructor?

thank you.


class CMachineFactory
{
protected:
CMachineFactory() {}
virtual ~CMachineFactory() {}
__________________________________________________________
CMachineFactory* CSemiAutoMachineFactory::m_pInstance = NULL;

class CSemiAutoMachineFactory : public CMachineFactory
{
protected:
CSemiAutoMachineFactory();
virtual ~CSemiAutoMachineFactory();

void CSemiAutoMachineFactory::DeleteInstance()
{
if(m_pInstance != NULL) {
delete m_pInstance; // Why not alowed. Isn't child is allowed
// to access parent's memeber?

m_pInstance = NULL;
}
}


E:\xxx\semiautomachinefactory.cpp(214) : error C2248: 'CMachineFactory::~CMachineFactory' : cannot access protected member declared in class 'CMachineFactory'
E:\Work\rd00072\ScanProxyEx\machinefactory.h(43) : see declaration of 'CMachineFactory::~CMachineFactory'
AnswerRe: singleton for a parent with protected destructor Pin
Axter12-Sep-05 0:34
professionalAxter12-Sep-05 0:34 
QuestionAbout System Menu == Plz Help Urgent Pin
parims11-Sep-05 23:44
parims11-Sep-05 23:44 

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.