When I allocate an array in a function I can use sizeof to get the length og the array in bytes but when I pass this to another function I can no longer do this. How does C++ know the length of an array when it just stores a pointer to the allocated memory? Why doesn't this work in other functions?
Thanks for any help,
How does C++ know the length of an array when allocated?