I already have an idea on how to malloc
a matrix if it were an int**
. But using a typedef
, I think have an idea but I'm not so sure.
typedef int LabeledAdjMatrix[SIZE][SIZE];
Do I do it like this?
APSP = (APSPMatrix*)malloc(sizeof(APSPMatrix));
But when I access it I'm gonna have to use *APSP[0][0]
and I have no idea how to use this in memset
/memcpy
.
Is there a proper way of doing this? Both in dynamically allocating and in accessing.