The code below is me trying to instantiate a 2d array, and it instantiating incorrectly: THE CODE:
FILE* kernalFile = fopen(argv[1], "r");
int rKernalSize;
fscanf(kernalFile, "%d", &rKernalSize);
unsigned int rKernal[rKernalSize][rKernalSize];
Data froma break point right after that code is ran: rKernalSize VALUES:
Name : rKernalSize
Details:3
Default:3
Decimal:3
Hex:0x3
Binary:11
Octal:03
rKernal VALUES:
Name : rKernal
Details:0x7ffffffe0cd0
Default:[0]
Decimal:[0]
Hex:[0]
Binary:[0]
Octal:[0]
or
rKernal[][0]
It should be rKernal[3][3]
and here is the file so you can look at it. If wanted:
3 -1 1 0 1 0 -1 0 -1 1 3 -1 1 0 1 0 -1 0 -1 1 3 -1 1 0 1 0 -1 0 -1 1
TLDR: rKernalSize
is correct (3) but when I create the 2d Array with rKernal[rKernalSize][rKernalSize]
it does not instantiate correctly! It instatiates as rKernal[][0]
maybe thats default but should be rKernal[3][3]