H
howa
// LinkedList.h
#pragma once
struct Node {
int data;
Node* next;
};
class LinkedList {
private:
Node* head;
size_t length;
void destroyList(Node**);
public:
LinkedList();
~LinkedList();
size_t getLength() { return length;};
void insert(int);
void remove(int);
void printList();
};
// LinkedList.cpp
#include "LinkedList.h"
LinkedList::LinkedList() {
head = 0;
};
LinkedList::~LinkedList() {
destroyList(&head);
};
//VS.net 2005 return: error LNK2019: unresolved external symbol
"private: void __thiscall LinkedList::destroyList(struct Node * *)"
what are the possible reason ?
thanks.
#pragma once
struct Node {
int data;
Node* next;
};
class LinkedList {
private:
Node* head;
size_t length;
void destroyList(Node**);
public:
LinkedList();
~LinkedList();
size_t getLength() { return length;};
void insert(int);
void remove(int);
void printList();
};
// LinkedList.cpp
#include "LinkedList.h"
LinkedList::LinkedList() {
head = 0;
};
LinkedList::~LinkedList() {
destroyList(&head);
};
//VS.net 2005 return: error LNK2019: unresolved external symbol
"private: void __thiscall LinkedList::destroyList(struct Node * *)"
what are the possible reason ?
thanks.