Unresolved External

This is the specific error:

1
2
3
4
Error	4	error LNK1120: 1 unresolved externals	

Error	3	error LNK2001: unresolved external symbol "double __cdecl getMedian(int *,int)" (?getMedian@@YANPAHH@Z)


This is the function its referencing to:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
double findMedian(int *values , int  size)
{
	double median = 0.0;
	int middle = 0;

	if( size % 2 == 0 )
	{
		middle = ( size / 2 ) - 1;
		median = (*( values + middle ) + *( values + (middle + 1 )) ) / 2.0;
	}

	else
	{
		middle  = (int) ( size / 2 );
		median = *( values + middle );
	}

	return median;
}


I can't seem to spot the problem. Any help is appreciated (:
The error says that it cannot find the function getMedian. You code shows findMedian - is that a typo where the function was called from?

You're right!! Thanks, I feel so stupid (:
Topic archived. No new replies allowed.