Delete a number from static array

I am trying to write a program that deletes a number from a static array (I can't use vectors). After this program compiles, I get the following error:

error LNK2019: unresolved external symbol "void __cdecl remove(int * const,int,int)" (?remove@@YAXQAHHH@Z) referenced in function _main

My intuition is telling me I am not seeing something that is very obvious.. but anyway here is my code and if I can get some input I would appreciate it.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* this function deletes a number from
   an array. The user is to enter the number to be deleted 
   and a void function, remove, deletes it
*/

void remove(int list[], int listLength, int removeItem); //function prototype

int main()
{
	int num[]={1,2,3,4,5,6,7,8,9,0}; //array num of size 10
	int removeNum; //variable to hold the number to be deleted from the array
	int length=10; //length of the array

	cout << "Enter an item you want removed from the list." << endl;
	cin >> removeNum;

	remove(num, length, removeNum); //function call to remove the number
	
	cout << "After removing " << removeNum << " from the list, the list is " << endl;

	for(int index=0;index<length;index++) //output the array after number is deleted
		cout << num[index] << " ";

	cout << endl;

	return 0;
}

void remove(int list[], int& listLength, int removeItem) //function to delete the number
{

	for(int i=0;i<listLength;i++)
		if(list[i]==removeItem) //checks to see whether the number to be deleted is found in the array
		{
			listLength=listLength-1; //decrements the lenght of the array by 1 if the number is found
			for(int index=i;index<listLength;index++) //loop to update the contents of the array after the number is deleted
			{
				list[index]=list[index+1];
			}
		break;
		}
}

Second arg is a reference in your function, but not your prototype.
thank you, no clue how I missed that
Topic archived. No new replies allowed.