Click here to Skip to main content
16,007,858 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Required resource Pin
MsmVc23-Nov-10 17:34
MsmVc23-Nov-10 17:34 
GeneralRe: Required resource Pin
Richard MacCutchan23-Nov-10 21:33
mveRichard MacCutchan23-Nov-10 21:33 
QuestionRe: Required resource Pin
David Crow23-Nov-10 3:06
David Crow23-Nov-10 3:06 
QuestionRe: Required resource Pin
David Crow23-Nov-10 3:08
David Crow23-Nov-10 3:08 
AnswerRe: Required resource Pin
Richard MacCutchan23-Nov-10 3:21
mveRichard MacCutchan23-Nov-10 3:21 
QuestionProblem Initialising derived class Pin
Still learning how to code22-Nov-10 22:33
Still learning how to code22-Nov-10 22:33 
QuestionRe: Problem Initialising derived class Pin
CPallini22-Nov-10 22:43
mveCPallini22-Nov-10 22:43 
AnswerRe: Problem Initialising derived class Pin
Still learning how to code23-Nov-10 0:14
Still learning how to code23-Nov-10 0:14 
Hi, I've found the reason for my original problem, but let me explain. I was originally trying to get operator= function coded, but was floundering and trying various things. For some daft reason, at some stage, I included a private variable m_time of type time in the derived class and this (of course !) was causing the initialisation problem. However, I am still left with the problem of how to deal with operator= !!
I've included my class below (hopefully in a code block - never done this before !)


<pre>// TimeEx.h: interface for the CTimeEx class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_TIMEEX_H__48005666_3D56_42ED_8ADD_8F9B119E194D__INCLUDED_)
#define AFX_TIMEEX_H__48005666_3D56_42ED_8ADD_8F9B119E194D__INCLUDED_

#if _MSC_VER &gt; 1000
#pragma once
#endif // _MSC_VER &gt; 1000

class CTimeEx : public CTime
{
public:
CTimeEx();

CTimeEx&amp; CTimeEx::operator=(const CTimeEx&amp; timeSource);

CTimeEx(const CTime&amp; TimeIn) : CTime(TimeIn) {};

virtual ~CTimeEx();

};

#endif // !defined(AFX_TIMEEX_H__48005666_3D56_42ED_8ADD_8F9B119E194D__INCLUDED_)

// TimeEx.cpp: implementation of the CTimeEx class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Test_Inhehitancy.h"
#include "TimeEx.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CTimeEx::CTimeEx()
{

}

CTimeEx::~CTimeEx()
{

}



CTimeEx&amp; CTimeEx::operator=(const CTimeEx&amp; timeSource)
{

// ?????????
}
</pre>
Doug
GeneralRe: Problem Initialising derived class Pin
CPallini23-Nov-10 0:40
mveCPallini23-Nov-10 0:40 
GeneralRe: Problem Initialising derived class Pin
Still learning how to code23-Nov-10 1:24
Still learning how to code23-Nov-10 1:24 
GeneralRe: Problem Initialising derived class Pin
CPallini23-Nov-10 1:25
mveCPallini23-Nov-10 1:25 
AnswerRe: Problem Initialising derived class Pin
Richard MacCutchan22-Nov-10 23:31
mveRichard MacCutchan22-Nov-10 23:31 
GeneralRe: Problem Initialising derived class Pin
Still learning how to code23-Nov-10 1:46
Still learning how to code23-Nov-10 1:46 
QuestionIcon of MessageBox not display. Pin
Le@rner22-Nov-10 18:44
Le@rner22-Nov-10 18:44 
AnswerRe: Icon of MessageBox not display. Pin
Luc Pattyn22-Nov-10 20:35
sitebuilderLuc Pattyn22-Nov-10 20:35 
QuestionRe: Icon of MessageBox not display. Pin
David Crow23-Nov-10 3:11
David Crow23-Nov-10 3:11 
AnswerRe: Icon of MessageBox not display. Pin
Le@rner23-Nov-10 17:09
Le@rner23-Nov-10 17:09 
QuestionI meet one problem, I donot know how to debug the JNI(java native code) project? Pin
yu-jian22-Nov-10 17:56
yu-jian22-Nov-10 17:56 
QuestionVc++ Project file(.dsp) use get all cpp function name? it is possible? Pin
mathivanaan22-Nov-10 17:43
mathivanaan22-Nov-10 17:43 
AnswerRe: Vc++ Project file(.dsp) use get all cpp function name? it is possible? Pin
Cool_Dev23-Nov-10 1:03
Cool_Dev23-Nov-10 1:03 
QuestionHow to export the drived class from one abstract class? And also STL container is used as private members. [modified] Pin
SAMZCN22-Nov-10 4:50
SAMZCN22-Nov-10 4:50 
AnswerRe: How to export the drived class from one abstract class? And also STL container is used as private members. Pin
Richard MacCutchan22-Nov-10 5:38
mveRichard MacCutchan22-Nov-10 5:38 
GeneralRe: How to export the drived class from one abstract class? And also STL container is used as private members. Pin
SAMZCN22-Nov-10 14:04
SAMZCN22-Nov-10 14:04 
GeneralRe: How to export the drived class from one abstract class? And also STL container is used as private members. Pin
Richard MacCutchan22-Nov-10 23:15
mveRichard MacCutchan22-Nov-10 23:15 
GeneralRe: How to export the drived class from one abstract class? And also STL container is used as private members. Pin
SAMZCN23-Nov-10 1:22
SAMZCN23-Nov-10 1:22 

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.