The pigLatin[i] works fine in the word piglatin function but i can not get it to work in the latinReturn array structure outside the function. Here is my code... anything will help
Word latinReturn[1];
latinReturn[0] = piglatin(pig,sum);
It is an error to dereference nonexistent elements on lines 29-30.
Your function returns one Word. That is no different from returning one int.
Line 51 is not standard C++. C++ does not support variable length arrays (VLA). C does and some compilers have extension for VLA in C++, but the standard way is to use C++ Standard Library Containers. For example, std::vector does store an array of elements, can be resized dynamically, can be returned from a function as a single object, and does dynamic deallocation for you too. Appropriately.