I have problem, i need to put file content(letters, numbers) in array and then return this array to main. As i understand there is no such a chance to just write return array; i tried to make pointer, but i have some problems with my code. Maybe someone can help me, here is code:
If you create the array within the function like that, as a local variable (i.e. created without using new) then when the function ends, that memory will be reused for something else and you will be left with a pointer to some memory that is no longer the array.
Create the array using new, or create the array outside the function and pass in a pointer to it, and have the function fill the array in.
Big thanks to you friends, JLBorges i need an array :( Moschops, could you correct my code and make it with "new", i don't understand where should i put it, to correct work.