Click here to Skip to main content
15,888,177 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to display a Message when click on a Edit Box Scroll bar ? Pin
pubududilena23-Dec-04 22:17
pubududilena23-Dec-04 22:17 
AnswerRe: How to display a Message when click on a Edit Box Scroll bar ? Pin
Aamir Butt23-Dec-04 22:31
Aamir Butt23-Dec-04 22:31 
GeneralRe: How to display a Message when click on a Edit Box Scroll bar ? Pin
pubududilena23-Dec-04 22:40
pubududilena23-Dec-04 22:40 
Questioncan i make command buttons in vc++(like vb) Pin
siva_nkl3323-Dec-04 21:47
siva_nkl3323-Dec-04 21:47 
AnswerRe: can i make command buttons in vc++(like vb) Pin
ThatsAlok23-Dec-04 22:47
ThatsAlok23-Dec-04 22:47 
Generalabout breakpoints in VC++ Pin
grace_sonal23-Dec-04 21:05
grace_sonal23-Dec-04 21:05 
GeneralRe: about breakpoints in VC++ Pin
mirex25-Dec-04 7:35
mirex25-Dec-04 7:35 
GeneralTemplate class and header files Pin
Imtiaz Murtaza23-Dec-04 19:01
Imtiaz Murtaza23-Dec-04 19:01 
Dear friends,
I am declaring a template class in header file and defining its methods in cpp file. As such i am getting an error of "unresolved external symbols" whenever i create object of this class.

Instead, if i define the methods in *.h file and remove cpp file, the errors are removed and program runs fine. Can anyone tell me whats the problem:

////////////////////////////////////////////////////////////////////////////
// File MyTemplate.h
template <class T> class TMyTemplate
{
public :

TMyTemplate();
~TMyTemplate();
};

template <class T>
TMyTemplate<T>::TMyTemplate()
{

}


template <class T>
TExpandableBuffer<T>::~TExpandableBuffer()
{
}
/////////////////////////////////////////////////////////////////

i.e i declared and defined functions in header file and this works fine for me. But if i remove the methods definition from header to cpp file the compiler starts giving me error of "Unresolved External Symbols" whenever i create object of class like:

TMyTemplate<char> myTemplate;





Imtiaz
GeneralRe: Template class and header files Pin
Michael Dunn23-Dec-04 21:08
sitebuilderMichael Dunn23-Dec-04 21:08 
Questionhow to call exe file in vc++ Pin
vc-programmer-23-Dec-04 17:31
vc-programmer-23-Dec-04 17:31 
AnswerRe: how to call exe file in vc++ Pin
parths23-Dec-04 18:03
parths23-Dec-04 18:03 
GeneralRe: how to call exe file in vc++ Pin
pavanbhai23-Dec-04 18:43
pavanbhai23-Dec-04 18:43 
AnswerRe: how to call exe file in vc++ Pin
Sarfraz Anwar23-Dec-04 18:18
Sarfraz Anwar23-Dec-04 18:18 
AnswerRe: how to call exe file in vc++ Pin
ThatsAlok23-Dec-04 18:21
ThatsAlok23-Dec-04 18:21 
GeneralRe: how to call exe file in vc++ Pin
Member 45151623-Dec-04 18:43
Member 45151623-Dec-04 18:43 
GeneralRe: thank...can i pass parameter Pin
vc-programmer-23-Dec-04 19:56
vc-programmer-23-Dec-04 19:56 
GeneralRe: thank...can i pass parameter Pin
Member 45151623-Dec-04 20:07
Member 45151623-Dec-04 20:07 
AnswerRe: how to call exe file in vc++ Pin
Michael Dunn23-Dec-04 21:41
sitebuilderMichael Dunn23-Dec-04 21:41 
QuestionHow to change the font of a owner-drawn menu Pin
max_xiayi23-Dec-04 14:40
max_xiayi23-Dec-04 14:40 
AnswerRe: How to change the font of a owner-drawn menu Pin
Michael Dunn23-Dec-04 22:18
sitebuilderMichael Dunn23-Dec-04 22:18 
GeneralRe: How to change the font of a owner-drawn menu Pin
ana_v12321-Sep-05 21:00
ana_v12321-Sep-05 21:00 
QuestionHow To create a window in MFC dynamically Pin
Rassul Yunussov23-Dec-04 14:06
Rassul Yunussov23-Dec-04 14:06 
AnswerRe: How To create a window in MFC dynamically Pin
Maximilien23-Dec-04 14:53
Maximilien23-Dec-04 14:53 
GeneralRe: How To create a window in MFC dynamically Pin
Anonymous23-Dec-04 19:34
Anonymous23-Dec-04 19:34 
GeneralIs there some kind of heap limit of DLL Pin
timtanbin23-Dec-04 11:03
timtanbin23-Dec-04 11:03 

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.