Help with basic program with functions

I am trying to make a program that takes in double values shows them, then reverses them, this is how far I have got! I know this program wouldn't do it and im not asking for how to make a program to reverse the doubles. I want to find that out myself, but this generates an error and that is what I am wondering about! Please help me fix it.

code:
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
43
44
45
#include "stdafx.h"
#include <iostream>

void show_array(double arr[] , int size);
void reverse_array(double arr[] , int  size);
int Fill_array(double arr[], int size);
using namespace std;

const int ArSize = 6;
int main()
{
	double numbers[ArSize];
	int sizeo = Fill_array(numbers,ArSize);
	show_array(numbers, sizeo);
	reverse_array(numbers, sizeo);
	show_array(numbers, sizeo);
	cin.get();
	cin.get();
	return 0;
}

int Fill_array(double arr[], int size)
{
	int i = 0;
	while(cin >> arr[i] && i < size)
		i++;
	return i + 1;
}
void show_array(double arr[], int size)
{
	for(int i = 0;i < size;i++)
		cout << i + 1 << ": " << arr[i];
}

void reverse(double arr[], int size)
{
	int i = 1;
	int s = size;
	while(i < (s / 2))
	{
		arr[i] = arr[i + (s / 2)];
		i++;
	}

}

Error:
Error	1	error LNK2019: unresolved external symbol "void __cdecl reverse_array(double * const,int)" (?reverse_array@@YAXQANH@Z) referenced in function _main	C:\Users\Computer\documents\visual studio 2012\Projects\Ch7_6\Ch7_6\Ch7_6.obj	Ch7_6

Line 5: void reverse_array(double arr[] , int size);
Line 35:void reverse(double arr[], int size)

Spot the difference?
Thank you it fixed the error ;) Still my program is very weird and not close to my target, some hint is appreciated :P

Edit: solved
Last edited on
Topic archived. No new replies allowed.