TArray pointer hep

i made a function that has this in it *TArray cube = &size; . Thing is if i want to access it like int8 hello = cube[5]; i will get a conversion error .

Define array type with template like this

TArray<int8> cube;