Mi sono creato una class Vettore che implementa i seguneti metodi:
Quote:
///////////////////////////////
// Costruttori/distruttori
///////////////////////////////
Vettore();
Vettore(int dim);
virtual ~Vettore();
///////////////////////////////
// Utilita di ricerca
///////////////////////////////
void Ordina();
int cerca(T key);
///////////////////////////////
// Funzioni di interfaccia
///////////////////////////////
int getDimensione();
T getElemento(int pos);
///////////////////////////////
// Funzioni vettore
///////////////////////////////
void AggiungiElemento(T elemento, int pos);
void AggiungiElemento(T elemento);
void RimuoviElemento(int pos);
|
Pero quando cerco di linkarlo mi da questi errori:
Quote:
--------------------Configuration: Vettore - Win32 Debug--------------------
Linking...
Test.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall Vettore<int>::~Vettore<int>(void)" (??1?$Vettore@H@@UAE@XZ)
Test.obj : error LNK2001: unresolved external symbol "public: int __thiscall Vettore<int>::cerca(int)" (?cerca@?$Vettore@H@@QAEHH@Z)
Test.obj : error LNK2001: unresolved external symbol "public: int __thiscall Vettore<int>::getElemento(int)" (?getElemento@?$Vettore@H@@QAEHH@Z)
Test.obj : error LNK2001: unresolved external symbol "public: int __thiscall Vettore<int>::getDimensione(void)" (?getDimensione@?$Vettore@H@@QAEHXZ)
Test.obj : error LNK2001: unresolved external symbol "public: void __thiscall Vettore<int>: rdina(void)" (?Ordina@?$Vettore@H@@QAEXXZ)
Test.obj : error LNK2001: unresolved external symbol "public: void __thiscall Vettore<int>::AggiungiElemento(int)" (?AggiungiElemento@?$Vettore@H@@QAEXH@Z)
Test.obj : error LNK2001: unresolved external symbol "public: void __thiscall Vettore<int>::AggiungiElemento(int,int)" (?AggiungiElemento@?$Vettore@H@@QAEXHH@Z)
Test.obj : error LNK2001: unresolved external symbol "public: __thiscall Vettore<int>::Vettore<int>(int)" (??0?$Vettore@H@@QAE@H@Z)
Debug/Vettore.exe : fatal error LNK1120: 8 unresolved externals
Error executing link.exe.
Vettore.exe - 9 error(s), 0 warning(s)
|
Vi allego il progetto (Visual C++ 6) cosi magari serve anche a qualcuno