Click here to Skip to main content
15,902,299 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to smooth roll the text? Pin
Christian Graus3-Mar-05 16:47
protectorChristian Graus3-Mar-05 16:47 
GeneralRe: how to smooth roll the text? Pin
lowiq4-Mar-05 21:45
lowiq4-Mar-05 21:45 
GeneralVS.NET keeps renaming resources !!! Pin
Christian Graus3-Mar-05 14:41
protectorChristian Graus3-Mar-05 14:41 
GeneralRe: VS.NET keeps renaming resources !!! Pin
Christian Graus3-Mar-05 15:18
protectorChristian Graus3-Mar-05 15:18 
GeneralSaving several documents Pin
joy0073-Mar-05 14:30
joy0073-Mar-05 14:30 
GeneralDouble right click Pin
joy0073-Mar-05 14:21
joy0073-Mar-05 14:21 
GeneralRe: Double right click Pin
zhang8006053-Mar-05 14:49
zhang8006053-Mar-05 14:49 
Generaltemplate issues Pin
act_x3-Mar-05 11:19
act_x3-Mar-05 11:19 
I am trying to use a template class :
.h file
template <typename T>
class MyList
{
public:
MyList();
virtual ~MyList();

bool Insert(T **head, T *newNode);

private :
T *next;
int size;

};


.cpp file
#include "MyList.h"
template <typename T>MyList<T>::MyList()
{

}

template <typename T>MyList<T>::~MyList()
{

}


template <typename T>bool MyList<T>::Insert(T **head, T *newNode)
{
if(newNode==NULL)
return false;
r
if(*head==NULL){
*head = newNode ;
*head->next =NULL;
}
else{
T *temp;
temp=*head;

while(temp->next){
temp=temp->next;
}
temp->next=newNode;
newNode->next=0;

}
return true ;
}


Now i try to use this outside :

#<code>include <iostream.h>

#include "Project.h"
#include "MyList.h"

void main()
{

MyList<int> t1;


}</code>


I get a linker error :

Linking...
main.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall MyList<int>::~MyList<int>(void)" (??1?$MyList@H@@UAE@XZ)
main.obj : error LNK2001: unresolved external symbol "public: __thiscall MyList<int>::MyList<int>(void)" (??0?$MyList@H@@QAE@XZ)
Debug/CEepromParserTest.exe : fatal error LNK1120: 2 unresolved externals


I dont know what is wrong here !
GeneralRe: template issues Pin
Michael Dunn3-Mar-05 11:39
sitebuilderMichael Dunn3-Mar-05 11:39 
GeneralRe: template issues Pin
Christian Graus3-Mar-05 11:43
protectorChristian Graus3-Mar-05 11:43 
Generallocalization of .RCs Pin
rastompk3-Mar-05 9:18
rastompk3-Mar-05 9:18 
GeneralRe: localization of .RCs Pin
Chris Losinger3-Mar-05 10:22
professionalChris Losinger3-Mar-05 10:22 
GeneralRe: localization of .RCs Pin
rastompk4-Mar-05 5:31
rastompk4-Mar-05 5:31 
GeneralRe: localization of .RCs Pin
Chris Losinger4-Mar-05 6:29
professionalChris Losinger4-Mar-05 6:29 
GeneralRe: localization of .RCs Pin
rastompk7-Mar-05 11:09
rastompk7-Mar-05 11:09 
GeneralRendering client's mouse and keyboard events Pin
harshi3-Mar-05 8:37
harshi3-Mar-05 8:37 
GeneralRe: Rendering client's mouse and keyboard events Pin
Ravi Bhavnani3-Mar-05 9:42
professionalRavi Bhavnani3-Mar-05 9:42 
Generalcheck if cd is burning a disc Pin
sstoyan3-Mar-05 7:53
sstoyan3-Mar-05 7:53 
GeneralRe: check if cd is burning a disc Pin
Anand for every one3-Mar-05 19:10
Anand for every one3-Mar-05 19:10 
GeneralRe: check if cd is burning a disc Pin
sstoyan5-Mar-05 0:02
sstoyan5-Mar-05 0:02 
GeneralControlling media playback using windows media sdk Pin
Nikhil Wason3-Mar-05 7:49
Nikhil Wason3-Mar-05 7:49 
GeneralStandard Template Library Pin
DR19423-Mar-05 7:26
DR19423-Mar-05 7:26 
GeneralRe: Standard Template Library Pin
Chris Losinger3-Mar-05 10:12
professionalChris Losinger3-Mar-05 10:12 
GeneralRe: Standard Template Library Pin
DR19423-Mar-05 11:35
DR19423-Mar-05 11:35 
GeneralScanning &amp; extracting from CString Pin
José Luis Sogorb3-Mar-05 6:50
José Luis Sogorb3-Mar-05 6:50 

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.