I was wondering what would be the best way to take an input from a text file containing first and last names and put each line into a dynamic array. Thanks
Use a temporary array and read the string from the file and put it in the temporary array. Now calculate the string length of the array and allocate a new dynamic array for the string length + 1 and copy the string from the temporary array to the new dynamic array. Repeat the process.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.