c ++ – How to pass a file as an argument to a function?

I would like to know how to pass a file as an argument.
For example, if I have a "data" file, should I pass it as myArchive variable (as in the program I've shown below)?

// The contents of the data file are: 1 2 3 4 5

// The program should simply save the numbers from one to five

#include 
#include 
#include 
using namespace std;

void leer_array (int num [], int, file); // the file I do not know how to pass it here, that would be all my doubt

int main () {

const int SIZE = 5;
int numbers[] = {0,0,0,0,0};


ifstream myFile;
myFile.open ("data"); // open the file

read_array (num[] , SIZE, myFile); // function call


myFile.close ();


returns 0;


}


void leer_array (int num [], int size, file) {// I'm not sure how to pass the third parameter.

int i = 0, index;

while < tamaƱo && archivo >> num[i]) {

i ++;

}

for (index = 0; index <size; index ++) {

cost << num [index] << "";

}


}

Thank you very much to all those who answer.