Click here to Skip to main content
15,905,322 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: About DirectX??? Pin
Mark Salsbery1-Mar-07 8:00
Mark Salsbery1-Mar-07 8:00 
QuestionNeed to draw background of edit control Pin
Nishad S28-Feb-07 21:16
Nishad S28-Feb-07 21:16 
AnswerRe: Need to draw background of edit control Pin
baerten28-Feb-07 22:41
baerten28-Feb-07 22:41 
GeneralRe: Need to draw background of edit control Pin
Nishad S28-Feb-07 23:39
Nishad S28-Feb-07 23:39 
AnswerRe: Need to draw background of edit control Pin
Hamid_RT28-Feb-07 23:35
Hamid_RT28-Feb-07 23:35 
Questionnew operator Pin
prithaa28-Feb-07 21:07
prithaa28-Feb-07 21:07 
AnswerRe: new operator Pin
Cedric Moonen28-Feb-07 21:16
Cedric Moonen28-Feb-07 21:16 
GeneralRe: new operator Pin
prithaa28-Feb-07 21:56
prithaa28-Feb-07 21:56 
Hello,

Thanks for you reply

This is my code snippet

class CRICH : public CRichEditCtrl
{
// Construction
public:
CRICH();
void Fill(CFont& H,Variant Data);
void Create1(CView *pView,CRect Rect,int index);
bool operator =(CRICH& c);
};



The following is a template class

template <class T> class TDataTable
{
public:
TDataTable();
TDataTable(int m, int n);
void constructor(int m,int n);
void clear() {m_numRow=m_numCol=0; TData.clear();};
void InsertRow(int rowno);
void DeleteRow(int rowno);
void AddRow();
int numRow() {return m_numRow;};
int numCol() {return m_numCol;};
T& operator() (int i,int j) {return TData[m_numCol*i+j];}
vector<T> GetOneRow(int i);
//virtual ~TDataTable();
private :
int m_numRow, m_numCol;
vector<T>TData;
T tdefault;
};

The following is the function constructor which I want to call while initializing objects in a vector


template <class T> void TDataTable<T>::constructor(int m, int n)
{
tdefault = T();
m_numRow = m; m_numCol = n;
TData.assign(m_numRow*m_numCol, tdefault);
}

If I call the function constructor() like the following

TDataTable<crich*> m_TableForDisplay;
m_TableForDisplay.constructor(row,col);

now TData is not initialized and while debugging if I press F11 at the point

tdefault = T();

then the constructor of CRICH is not called.
but for other of my classes their respective constructors
are called and tdefault gets initialized

Thanks

Prithaa
Questionhow to use SetPrinterDataEx() Pin
mo_nica88128-Feb-07 20:58
mo_nica88128-Feb-07 20:58 
AnswerRe: how to use SetPrinterDataEx() Pin
prasad_som28-Feb-07 23:13
prasad_som28-Feb-07 23:13 
Questionnew operator not understood Pin
prithaa28-Feb-07 20:01
prithaa28-Feb-07 20:01 
AnswerRe: new operator not understood Pin
Cedric Moonen28-Feb-07 20:13
Cedric Moonen28-Feb-07 20:13 
SuggestionRe: new operator not understood Pin
Pranit Kothari27-Oct-11 19:14
Pranit Kothari27-Oct-11 19:14 
GeneralRe: new operator not understood Pin
Cedric Moonen27-Oct-11 20:19
Cedric Moonen27-Oct-11 20:19 
AnswerRe: new operator not understood Pin
ThatsAlok28-Feb-07 20:27
ThatsAlok28-Feb-07 20:27 
GeneralRe: new operator not understood Pin
Stephen Hewitt28-Feb-07 20:32
Stephen Hewitt28-Feb-07 20:32 
GeneralRe: new operator not understood Pin
prithaa28-Feb-07 20:44
prithaa28-Feb-07 20:44 
QuestionMultithreading in VC++ Pin
Karismatic28-Feb-07 19:54
Karismatic28-Feb-07 19:54 
AnswerRe: Multithreading in VC++ Pin
ThatsAlok28-Feb-07 20:00
ThatsAlok28-Feb-07 20:00 
GeneralRe: Multithreading in VC++ Pin
Hamid_RT28-Feb-07 20:09
Hamid_RT28-Feb-07 20:09 
GeneralRe: Multithreading in VC++ Pin
ThatsAlok28-Feb-07 20:24
ThatsAlok28-Feb-07 20:24 
AnswerRe: Multithreading in VC++ Pin
ThatsAlok28-Feb-07 20:24
ThatsAlok28-Feb-07 20:24 
AnswerRe: Multithreading in VC++ Pin
Hamid_RT28-Feb-07 20:42
Hamid_RT28-Feb-07 20:42 
QuestionConvert from SDI to MDI application in VC++ Pin
Karismatic28-Feb-07 19:48
Karismatic28-Feb-07 19:48 
AnswerRe: Convert from SDI to MDI application in VC++ Pin
Hamid_RT28-Feb-07 19:52
Hamid_RT28-Feb-07 19:52 

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.