Click here to Skip to main content
15,887,683 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: Spying on socket Ports Pin
Monty214-Jan-04 1:49
Monty214-Jan-04 1:49 
GeneralRe: Spying on socket Ports Pin
Alexander M.,14-Jan-04 4:02
Alexander M.,14-Jan-04 4:02 
GeneralRe: Spying on socket Ports Pin
Lim Bio Liong14-Jan-04 5:26
Lim Bio Liong14-Jan-04 5:26 
GeneralRe: Spying on socket Ports Pin
bryce14-Jan-04 11:43
bryce14-Jan-04 11:43 
GeneralRe: Spying on socket Ports Pin
kbsoftware14-Jan-04 12:00
kbsoftware14-Jan-04 12:00 
GeneralVERY URGENT...HELP ME! Pin
swarnamanoo14-Jan-04 1:25
swarnamanoo14-Jan-04 1:25 
GeneralTerminal Server Enumerate processes only belongin to the current user session Pin
Braulio Dez14-Jan-04 1:00
Braulio Dez14-Jan-04 1:00 
GeneralRe: Terminal Server Enumerate processes only belongin to the current user session Pin
22491714-Jan-04 1:21
22491714-Jan-04 1:21 
GeneralRe: C++ Pin
Joaquín M López Muñoz14-Jan-04 2:38
Joaquín M López Muñoz14-Jan-04 2:38 
GeneralRe: C++ Pin
NewbieCoder14-Jan-04 2:43
NewbieCoder14-Jan-04 2:43 
GeneralRe: C++ Pin
Joaquín M López Muñoz14-Jan-04 3:03
Joaquín M López Muñoz14-Jan-04 3:03 
GeneralRe: C++ Pin
Member 81460314-Jan-04 3:32
Member 81460314-Jan-04 3:32 
GeneralRe: C++ Pin
David Crow14-Jan-04 3:33
David Crow14-Jan-04 3:33 
GeneralRe: C++ Pin
NewbieCoder14-Jan-04 5:01
NewbieCoder14-Jan-04 5:01 

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.