how do u assign the values to different variables when it is presneted in one line??

hey people..
i have a configuration file that looks like
7080 7988
net04.xxxxx.edu
20

where 20 is the number of threads in the thread pool initially.
net04.xxxxx.edu is the hostname.
and 7080 7988
are two ports. first one for client requests and second one for dns communication. now my problem is,
how will i split these two?
if i read line, it will read both values..
do i read them as two separate arguments?
do i check for a space in between and then take them up respectively?
are there suggestions ?? lemme know pls.
bye bye

int port1=0;
int port2=0;
FILE *fp=fopen("config.file","r");
fscanf(fp,"%d %d", &port1, &port2);

Hey Jim.. thanks a lot.. will surely try it... :slight_smile: