TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
c question
i have a file server.list that contains server names
server1
server2
and i need to initialize an array to those strings
array[0] = "server1";
array[1] = "server2";
but i want to do this dynamicly, ie i want this program to read the file and
assign each string to the array subscript
array[0] --> server1 while reading the file
how do i get a line and assign a string to an array
then move forward in the array and assign the next string to the next space
in the array?
any ideas ???
--chris engstrom
bl155@treewax.com