I've searched and found a lot of answers on this warning but i cant seem to solve it anyway.
Code works to confirm if a word is a palindrome, but i would like to fix the warning.
(warning at word2)
I get that it has to change the array size for every loop iteration and if I'm correct I'm supposed to preallocate it beforehand.
I tried doing this by defining word2 before the for loop with:
but then I just get an array with 0's as output.
Thanks in advance.