Pointer to differnt .CPP array help

i have two .cpp's called first.cpp and third.cpp and one header called second.h

first.cpp
using namespace std;
#include "second.h"

int main()
{
int hello[6](5,5,4,4,2,3);
function(???); //calling function

return 0;
}

second.h
#include third.cpp
unsigned function(????); //declaring function

third.cpp
unsigned function(?????)
{

return 0;
}

how would i be able to use all the array values in the new function??, bit confused with pointers
unsigned function(int * arr) or int arr[]. Note that this does not tell you how many elements there are. Either assume a constant, or pass it separately.
Also, your array declaration is wrong. It should be int hello[6] = {5, 5, 4, 4, 2, 3};
Note that the number of files has nothing to do with this problem.
Last edited on
Topic archived. No new replies allowed.