i need your help with this. my function is: (the way it works is true)
#include <iostream>
using namespace std;
#define V 4
#define INF 999
int floydWarshall(int graph[][V]){
int dist[V][V], i, j, k;
for (i = 0; i < V; i++)
for (j = 0; j < V; j++)
dist[i][j] = graph[i][j];
for (k = 0; k < V; k++)
{
for (i = 0; i < V; i++)
{
for (j = 0; j < V; j++)
{
if (dist[i][k] + dist[k][j] < dist[i][j])
dist[i][j] = dist[i][k] + dist[k][j];
}
}
}
return dist[V][V];
}
and this line has the error array must be initialized with a brace-enclosed initializer:
int dist[V][V] = floydWarshall(graph[][V]);