201  PNCPS FINANCIAL ACCT   10027         3   8.00- 8.50  MWF    GSB 400

I have a text file with rows similar to that above. I need to read the data in the 
rows into an array. fscanf likes to split the line into elements by spaces and I get 

201,PNCPS,FINANCIAL,ACCT etc...

and I need results like 

201,PNCPS FINANCIAL ACCT,10027 etc...

data[1]=201
data[2]=PNCPS FINANCIAL ACCT   
data[3]=10027
data[4]=3
data[5]=8.00
data[6]=8.50
data[7]=MWF
data[8]=GSB 400

Can anybody provide any help on how to do this?

Reply via email to