Click here to Skip to main content
15,908,020 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Delete contents of a file??? Pin
David Crow14-Jan-04 3:14
David Crow14-Jan-04 3:14 
AnswerRe: Delete contents of a file??? Pin
El'Cachubrey14-Jan-04 3:32
El'Cachubrey14-Jan-04 3:32 
AnswerRe: Delete contents of a file??? Pin
Alexander M.,14-Jan-04 4:10
Alexander M.,14-Jan-04 4:10 
GeneralHelp!!!Property page Pin
El'Cachubrey14-Jan-04 2:42
El'Cachubrey14-Jan-04 2:42 
GeneralRe: Help!!!Property page Pin
David Crow14-Jan-04 2:49
David Crow14-Jan-04 2:49 
GeneralRe: Help!!!Property page Pin
El'Cachubrey14-Jan-04 3:14
El'Cachubrey14-Jan-04 3:14 
GeneralPointer to user-defined fields Pin
derzellner14-Jan-04 2:26
derzellner14-Jan-04 2:26 
GeneralRe: Pointer to user-defined fields Pin
l a u r e n14-Jan-04 9:50
l a u r e n14-Jan-04 9:50 
GeneralCDHTMLDialog with Frameset Pin
Kene14-Jan-04 2:21
Kene14-Jan-04 2:21 
QuestionHow to replace a variable everywhere in a big project ? Pin
Pierre_114-Jan-04 2:09
sussPierre_114-Jan-04 2:09 
AnswerRe: How to replace a variable everywhere in a big project ? Pin
Kene14-Jan-04 2:26
Kene14-Jan-04 2:26 
GeneralRe: How to replace a variable everywhere in a big project ? Pin
pierre_114-Jan-04 2:31
susspierre_114-Jan-04 2:31 
AnswerRe: How to replace a variable everywhere in a big project ? Pin
G. Raven14-Jan-04 2:41
G. Raven14-Jan-04 2:41 
AnswerRe: How to replace a variable everywhere in a big project ? Pin
David Crow14-Jan-04 2:58
David Crow14-Jan-04 2:58 
AnswerRe: How to replace a variable everywhere in a big project ? Pin
Prakash Nadar14-Jan-04 6:23
Prakash Nadar14-Jan-04 6:23 
QuestionHow to replace a variable everywhere in a big project ? Pin
Anonymous14-Jan-04 2:08
Anonymous14-Jan-04 2:08 
AnswerRe: How to replace a variable everywhere in a big project ? Pin
Alexander M.,14-Jan-04 3:56
Alexander M.,14-Jan-04 3:56 
GeneralDeploy & Path Names - Help Pin
sweep12314-Jan-04 2:06
sweep12314-Jan-04 2:06 
GeneralRe: Deploy & Path Names - Help Pin
David Crow14-Jan-04 3:09
David Crow14-Jan-04 3:09 
GeneralRe: Deploy & Path Names - Help Pin
l a u r e n14-Jan-04 9:52
l a u r e n14-Jan-04 9:52 
GeneralLinker Error Pin
rajeev14-Jan-04 1:53
rajeev14-Jan-04 1:53 
GeneralRe: Linker Error Pin
Joaquín M López Muñoz14-Jan-04 2:53
Joaquín M López Muñoz14-Jan-04 2:53 
This is a very common (and interesting) problem with how template instantiation is performed. The subject is deeper than I'm going to explain, but this can serve as a starter.

The template definition (Check.cpp in your case) can be considered as a "code skeleton" that the compiler uses to generate the actual code when needed. The process of generating actual code from the template definition is called instantiation:
template <class T> class foo
{
... // definition for foo class template
};
...
foo<int> a; // instantiation of foo for int
foo<string> b; // instantiation of foo for b
The point of instantiation (POI) does not occur at the definition, but when the template is first used. Except in cases I will not go into, the definition of the template must be visible from the POI.

So, in your second situation the POI in Test.cpp does not see where the definition of the template is, while compiling Check.cpp alone does not produce any code at all (no instantiation inside Check.cpp.) You got it?

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: Linker Error Pin
rajeev14-Jan-04 17:31
rajeev14-Jan-04 17:31 
GeneralSpying on socket Ports Pin
Monty214-Jan-04 1:32
Monty214-Jan-04 1:32 
GeneralRe: Spying on socket Ports Pin
bryce14-Jan-04 1:36
bryce14-Jan-04 1:36 

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.