Hi all,
What should I write for function signature in order to return this 6X6 array without compiler error? I tried to use int* getGraph()
, but it did not work.
Thanks for your help.
int[6][6] getGraph()
{
int graph[6][6] = {
{0, 5, 10, -1, -1, -1},
{-1, 0, -1, 2, -1, -1},
{-1, -1, 0, -1, 10, -1},
{-1, -1, -1, 0, 1, -1},
{-1, -1, -1, -1, 0, 10},
{-1, -1, -1, -1, -1, 0} };
return graph;
}