LNK2019 Error
-
Hi Developers, I am writing a template class. In template class - class is declared and defined in the same header file..i.e. there is no need to include .cpp file. So when i first declare the class and then define it within the same header file and include it in a test (Main) file. Then i get this many LNK2019 error Whereas if i directly define the class without first declaring it then it works perfectly fine. or if i remove the test (main) file then also i do not get any LNK2019 error. What could be the problem here ? Any help would be greatly appreciated. Ta James
-
Hi Developers, I am writing a template class. In template class - class is declared and defined in the same header file..i.e. there is no need to include .cpp file. So when i first declare the class and then define it within the same header file and include it in a test (Main) file. Then i get this many LNK2019 error Whereas if i directly define the class without first declaring it then it works perfectly fine. or if i remove the test (main) file then also i do not get any LNK2019 error. What could be the problem here ? Any help would be greatly appreciated. Ta James