Click here to Skip to main content
15,891,529 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to resolve this problem fatal error LNK1104: cannot open file 'libboost_filesystem-vc80-mt-gd-1_35.lib' Pin
Pak_Coder22-Jun-08 5:30
Pak_Coder22-Jun-08 5:30 
AnswerRe: how to resolve this problem fatal error LNK1104: cannot open file 'libboost_filesystem-vc80-mt-gd-1_35.lib' Pin
Saurabh.Garg22-Jun-08 5:38
Saurabh.Garg22-Jun-08 5:38 
GeneralRe: how to resolve this problem fatal error LNK1104: cannot open file 'libboost_filesystem-vc80-mt-gd-1_35.lib' Pin
Pak_Coder22-Jun-08 5:41
Pak_Coder22-Jun-08 5:41 
GeneralRe: how to resolve this problem fatal error LNK1104: cannot open file 'libboost_filesystem-vc80-mt-gd-1_35.lib' Pin
zafersavas22-Jun-08 6:03
zafersavas22-Jun-08 6:03 
GeneralRe: how to resolve this problem fatal error LNK1104: cannot open file 'libboost_filesystem-vc80-mt-gd-1_35.lib' Pin
Pak_Coder22-Jun-08 6:07
Pak_Coder22-Jun-08 6:07 
GeneralRe: how to resolve this problem fatal error LNK1104: cannot open file 'libboost_filesystem-vc80-mt-gd-1_35.lib' Pin
Saurabh.Garg22-Jun-08 14:25
Saurabh.Garg22-Jun-08 14:25 
QuestionHelp is restoring MS exchange 2003 programmatically? Pin
nasif400322-Jun-08 4:38
nasif400322-Jun-08 4:38 
QuestionWhy the Template Classe can't build in two file (.cpp and .h) Pin
liuxianming200122-Jun-08 2:27
liuxianming200122-Jun-08 2:27 
CThree.h is :
template < class T ><br />
class CThree<br />
{<br />
private:<br />
	T a, b, c;<br />
public:<br />
	CThree(T t1, T t2, T t3);<br />
	T Min();<br />
	T Max();<br />
};


CThree.cpp is :
template < class T ><br />
T CThree< T >::Min()<br />
{<br />
	T minab = a < b ? a : b;<br />
	return minab < c ? minab : c;<br />
}<br />
<br />
template < class T ><br />
T CThree< T >::Max()<br />
{<br />
	T maxab = a < b ? b : a;<br />
	return maxab < c ? c : maxab;<br />
}<br />
<br />
template < class T ><br />
CThree< T >::CThree(T t1, T t2, T t3):a(t1), b(t2), c(t3)<br />
{<br />
	return;<br />
}


compile is ok, but when I use this Template Classe, it take wrong.
Usage code is :
CThree< int > obj1(2, 5, 4);<br />
int MAX1 = obj1.Max();<br />
int MIN1 = obj1.Min();

part of the wrong is :

1>TemplateFunction.obj : error LNK2019: unresolved external symbol "public: __thiscall CThree<int>::CThree<int>(int,int,int)" (??0?$CThree@H@@QAE@HHH@Z) referenced in function _wmain

Anybody tell me why?

Thanks! Smile | :)
AnswerRe: Why the Template Classe can't build in two file (.cpp and .h) Pin
Saurabh.Garg22-Jun-08 2:40
Saurabh.Garg22-Jun-08 2:40 
GeneralRe: Why the Template Classe can't build in two file (.cpp and .h) Pin
liuxianming200122-Jun-08 3:50
liuxianming200122-Jun-08 3:50 
GeneralRe: Why the Template Classe can't build in two file (.cpp and .h) Pin
Saurabh.Garg22-Jun-08 3:54
Saurabh.Garg22-Jun-08 3:54 
AnswerRe: Why the Template Classe can't build in two file (.cpp and .h) Pin
Nibu babu thomas22-Jun-08 17:27
Nibu babu thomas22-Jun-08 17:27 
GeneralRe: Why the Template Classe can't build in two file (.cpp and .h) Pin
liuxianming200122-Jun-08 19:03
liuxianming200122-Jun-08 19:03 
GeneralRe: Why the Template Classe can't build in two file (.cpp and .h) Pin
Nibu babu thomas22-Jun-08 19:06
Nibu babu thomas22-Jun-08 19:06 
QuestionService Pin
New522-Jun-08 0:51
New522-Jun-08 0:51 
AnswerRe: Service Pin
led mike22-Jun-08 14:51
led mike22-Jun-08 14:51 
QuestionDirectSound : stop play when switching between windows in the same application Pin
Hanan88822-Jun-08 0:33
Hanan88822-Jun-08 0:33 
QuestionRotating view Pin
Identity Undisclosed21-Jun-08 17:38
Identity Undisclosed21-Jun-08 17:38 
AnswerRe: Rotating view Pin
Nelek23-Jun-08 13:20
protectorNelek23-Jun-08 13:20 
QuestionWindows GUI in Console Application Pin
ForNow21-Jun-08 17:09
ForNow21-Jun-08 17:09 
AnswerRe: Windows GUI in Console Application Pin
led mike22-Jun-08 15:17
led mike22-Jun-08 15:17 
GeneralRe: Windows GUI in Console Application Pin
ForNow22-Jun-08 15:35
ForNow22-Jun-08 15:35 
GeneralRe: Windows GUI in Console Application Pin
led mike23-Jun-08 5:48
led mike23-Jun-08 5:48 
GeneralRe: Windows GUI in Console Application Pin
ForNow23-Jun-08 12:57
ForNow23-Jun-08 12:57 
QuestionWhere should I store application's shared config file that are the same for all user of windows in VISTA Pin
xanagan66621-Jun-08 17:05
xanagan66621-Jun-08 17:05 

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.