**I am making the problem of the cheapest trip by the river. But it happens
that I have always had problems passing as a parameter
two-dimensional, I tried with**

```
int minorCandidate (int origin, int destination, int n, int T[][10], int & C)
```

Y

```
int minorCandidate (int origin, int destination, int n, int T[][10], int C[][4])
```

**and others, if not what you could do is put fixed values. But I would like to implement so that the user could assign the values for the array T that is the rate table.**

` #include `
using namespace std;
int piers (int origin, int destination, int T[][10]);
int minorCandidate (int origin, int destination, int n, int T[][10], int & C);
int minimum (int a, int b);
int main () {
int n;
cout <<"Numero de embarcaderos: ";cin>> n;
int T[n][n]= {{0,3,4,10}, {3,0,1,3}, {4,1,0,1}, {10,3,2,0}};
// print T
for (int i = 0; i <n; i ++) {
cout << endl;
for (int j = 0; j <n; j ++) {
cout << T[i][j]<< "";
}
}
// cout << "Solution:" << jetties (1,5, T);
}
int piers (int origin, int destination, int T[][10], int n) {
int C[n][n];
int i, j;
for (i = 1; i <n; i ++) {
for (j = 1; j <n; j ++) {
C[i][j]= minorCandidate (i, j, n, T, C);
}
}
return C[n][n];
}
int minorCandidate (int origin, int destination, int n, int T[][10], int & C) {
int temp;
temp = 100;
for (int i = origin + 1; i <n; i ++) {
temp = min (temp, T[origen][i]+ C[i][destino]);
}
return temp;
}
int min (int a, int b) {
if (a <= b)
return to;
if (b <a)
return b;
}