Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File input / dynamic arrays

Status
Not open for further replies.

Westin

Programmer
May 24, 2001
1
US
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.


Regards
Maniraja S
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top