Click here to Skip to main content
15,907,329 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to modify LPCTSTR content? Pin
Zac Howland15-Sep-06 9:08
Zac Howland15-Sep-06 9:08 
QuestionDisplaying continous values Pin
Pratheep Kenny14-Sep-06 22:56
Pratheep Kenny14-Sep-06 22:56 
AnswerRe: Displaying continous values Pin
Rinu_Raj14-Sep-06 23:01
Rinu_Raj14-Sep-06 23:01 
QuestionProblem with fonts in DC ? Pin
Vinod Sankaranarayanan14-Sep-06 22:49
Vinod Sankaranarayanan14-Sep-06 22:49 
AnswerRe: Problem with fonts in DC ? Pin
kk.tvm14-Sep-06 22:52
kk.tvm14-Sep-06 22:52 
AnswerRe: Problem with fonts in DC ? Pin
Steve S14-Sep-06 22:52
Steve S14-Sep-06 22:52 
AnswerRe: Problem with fonts in DC ? Pin
Hamid_RT15-Sep-06 7:26
Hamid_RT15-Sep-06 7:26 
QuestionLinking Error when use Class Template in VC6 [modified] Pin
Andy Rama14-Sep-06 20:42
Andy Rama14-Sep-06 20:42 
I create an 'Win32 Console Application' "Program01" in VC6 as follows,
//Program01.cpp File<br />
#include "stdafx.h"    #include "Class.h"<br />
int main(int argc, char* argv[]){<br />
	Class<int> a;<br />
	int b = a.GetValue(1729);<br />
	printf("\n\t");<br />
	return 0;<br />
}<br />
<br />
//Class.cpp File<br />
#include "stdafx.h"   #include "Class.h"<br />
template <class T><br />
Class<T>::Class(){<br />
}<br />
template <class T><br />
Class<T>::~Class(){<br />
}<br />
template <class T><br />
int Class<T>::GetValue(int value){<br />
	return value;<br />
}<br />
<br />
//Class.h File<br />
template <class T> class Class{<br />
public:<br />
	Class();<br />
	virtual ~Class();<br />
	int GetValue(int value);<br />
};


It shows Linking error for the member functions of class. But when I remove template from Class the program runs well; even when I write all code (Class with template) in single "Program01.cpp" File then also it runs well.
Then what might be the problem in the above code?






-- modified at 4:03 Friday 15th September, 2006
AnswerRe: Linking Error when use Class Template in VC6 [modified] Pin
Mr.Brainley14-Sep-06 21:48
Mr.Brainley14-Sep-06 21:48 
AnswerRe: Linking Error when use Class Template in VC6 Pin
Nibu babu thomas14-Sep-06 21:56
Nibu babu thomas14-Sep-06 21:56 
GeneralRe: Linking Error when use Class Template in VC6 Pin
Andy Rama14-Sep-06 22:09
Andy Rama14-Sep-06 22:09 
GeneralRe: Linking Error when use Class Template in VC6 Pin
Nibu babu thomas14-Sep-06 22:19
Nibu babu thomas14-Sep-06 22:19 
GeneralRe: Linking Error when use Class Template in VC6 Pin
Andy Rama14-Sep-06 22:44
Andy Rama14-Sep-06 22:44 
GeneralRe: Linking Error when use Class Template in VC6 Pin
Nibu babu thomas14-Sep-06 22:46
Nibu babu thomas14-Sep-06 22:46 
QuestionHow to dynamically change the toolbar tip in MFC? Pin
ziyoo14-Sep-06 20:41
ziyoo14-Sep-06 20:41 
AnswerRe: How to dynamically change the toolbar tip in MFC? Pin
ziyoo15-Sep-06 15:30
ziyoo15-Sep-06 15:30 
Questionimages problem Pin
radhika2814-Sep-06 20:08
radhika2814-Sep-06 20:08 
AnswerRe: images problem Pin
_AnsHUMAN_ 14-Sep-06 20:21
_AnsHUMAN_ 14-Sep-06 20:21 
GeneralRe: images problem Pin
radhika2814-Sep-06 20:24
radhika2814-Sep-06 20:24 
GeneralRe: images problem Pin
ThatsAlok14-Sep-06 20:43
ThatsAlok14-Sep-06 20:43 
Questionreading .pst file Pin
neha.agarwal2714-Sep-06 19:01
neha.agarwal2714-Sep-06 19:01 
AnswerRe: reading .pst file Pin
Christian Graus14-Sep-06 19:14
protectorChristian Graus14-Sep-06 19:14 
GeneralRe: reading .pst file Pin
neha.agarwal2714-Sep-06 19:46
neha.agarwal2714-Sep-06 19:46 
GeneralRe: reading .pst file Pin
Christian Graus14-Sep-06 20:06
protectorChristian Graus14-Sep-06 20:06 
GeneralRe: reading .pst file Pin
neha.agarwal2714-Sep-06 20:20
neha.agarwal2714-Sep-06 20:20 

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.