Click here to Skip to main content
16,005,181 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to avoid warning LNK4224: /COMMENT is no longer supported Pin
Nelek20-Nov-07 2:25
protectorNelek20-Nov-07 2:25 
AnswerRe: How to avoid warning LNK4224: /COMMENT is no longer supported Pin
Paresh Chitte19-Nov-07 22:51
Paresh Chitte19-Nov-07 22:51 
GeneralRe: How to avoid warning LNK4224: /COMMENT is no longer supported Pin
Cedric Moonen19-Nov-07 23:14
Cedric Moonen19-Nov-07 23:14 
GeneralRe: How to avoid warning LNK4224: /COMMENT is no longer supported Pin
Paresh Chitte19-Nov-07 23:22
Paresh Chitte19-Nov-07 23:22 
GeneralRe: How to avoid warning LNK4224: /COMMENT is no longer supported Pin
mohindar_kks20-Nov-07 1:55
mohindar_kks20-Nov-07 1:55 
Questionreaching a database on network Pin
aguest19-Nov-07 21:28
aguest19-Nov-07 21:28 
AnswerRe: reaching a database on network Pin
David Crow20-Nov-07 3:07
David Crow20-Nov-07 3:07 
Questiona link error about template and construction Pin
richardye19-Nov-07 20:47
richardye19-Nov-07 20:47 
template <class beingcounted="">
class Counted
{
public:
class TooManyObjects{};
static int getObjectNum()
{
return m_ObjectNum;
};
protected:
Counted();
Counted(const Counted& count);
~Counted() { --m_ObjectNum; };

private:
static int m_ObjectNum;
static const size_t m_MaxObjectNum;
void init();
};

template <class beingcounted=""> Counted<beingcounted>::Counted()
{
init();
}

template <class beingcounted=""> Counted<beingcounted>::Counted(const Counted& count)
{
init();
}

template <class beingcounted=""> Counted<beingcounted>::init()
{
if(m_ObjectNum > m_MaxObjectNum)
{
throw TooManyObjects();
}
++m_ObjectNum;
}

class Printer: private Counted<printer>
{
public:
static Printer* makePrinter();
static Printer* makePrinter(const Printer& rhs);
~Printer();
void reset();
void performSelfTest();
using Counted<printer>::getObjectNum;
using Counted<printer>::TooManyObjects;
private:
Printer();
Printer(const Printer& rhs);
};

int Counted<printer>::m_ObjectNum = 0;
const size_t Counted<printer>::m_MaxObjectNum = 5;

Printer::Printer()
{

}
Printer::Printer(const Printer &rhs)
{

}
Printer::~Printer()
{

}

Printer* Printer::makePrinter()
{
return new Printer();
}

when I compile it, an unresolved symbol
"protected _thiscall":Counted<class printer="">:Counted<class printer="">(void)" are function
"private: _thiscall Printer:Printer(void)" reference
I don't know its meaning. How can I resolv it link error?
Many thanks.
AnswerRe: a link error about template and construction Pin
Cedric Moonen19-Nov-07 21:01
Cedric Moonen19-Nov-07 21:01 
AnswerRe: a link error about template and construction Pin
David Crow20-Nov-07 3:18
David Crow20-Nov-07 3:18 
GeneralRe: a link error about template and construction Pin
richardye20-Nov-07 14:01
richardye20-Nov-07 14:01 
GeneralRe: a link error about template and construction Pin
David Crow20-Nov-07 16:24
David Crow20-Nov-07 16:24 
QuestionCreating Module in Ms Access Database Pin
aaaan19-Nov-07 20:35
aaaan19-Nov-07 20:35 
QuestionSetting the caption text color Pin
subramanyeswari19-Nov-07 20:24
subramanyeswari19-Nov-07 20:24 
AnswerRe: Setting the caption text color Pin
Haroon Sarwar19-Nov-07 22:26
Haroon Sarwar19-Nov-07 22:26 
QuestionHistory Folder Pin
revanth198519-Nov-07 19:11
revanth198519-Nov-07 19:11 
AnswerRe: History Folder Pin
Roger Broomfield19-Nov-07 19:36
Roger Broomfield19-Nov-07 19:36 
GeneralRe: History Folder Pin
revanth198519-Nov-07 19:47
revanth198519-Nov-07 19:47 
GeneralRe: History Folder Pin
Roger Broomfield19-Nov-07 20:12
Roger Broomfield19-Nov-07 20:12 
AnswerRe: History Folder Pin
Hamid_RT19-Nov-07 19:53
Hamid_RT19-Nov-07 19:53 
AnswerRe: History Folder Pin
Paresh Chitte19-Nov-07 20:01
Paresh Chitte19-Nov-07 20:01 
GeneralRe: History Folder [modified] Pin
revanth198519-Nov-07 20:29
revanth198519-Nov-07 20:29 
GeneralRe: History Folder Pin
Paresh Chitte19-Nov-07 22:37
Paresh Chitte19-Nov-07 22:37 
AnswerRe: History Folder Pin
David Crow20-Nov-07 3:20
David Crow20-Nov-07 3:20 
QuestionRead CString in to a buffer Pin
CodingLover19-Nov-07 18:57
CodingLover19-Nov-07 18:57 

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.