Undefined reference to SortedList::SortedList()

This is my main file, it keeps giving me these errors about how i have an undefined reference to SortedList and its member functions.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>
#include "SortedList.h"
using namespace std;

int main()
{
	SortedList myList;
	myList.Insert(3);
	myList.Insert(5);
	myList.Insert(2);
	myList.ResetList();
	while (myList.HasNext())
	{
		int a = myList.GetNextItem();
		cout << a << ' ';
	}

	cin.get();
	return 0;
}
//--------------------------------------------------------------------------- 
This means the linker can't find the bodies for those functions.

Make sure you gave all those functions bodies. If you did, then make sure whatever cpp file the bodies are in is part of your project.
Topic archived. No new replies allowed.