Link to home
Start Free TrialLog in
Avatar of lwinkenb
lwinkenb

asked on

scanf question

I've never really used scanf or fscanf before, and I was wondering if it would work for this situation:

I have a file in the format of:

var1=something
var2=somethingelse...

I tried using:
fscanf(f,"%s=%s\r\n",szVar,szVal);

That didn't work since szVar got filled with the entire line.  Can scanf do this, or do I need to do the parsing myself?
ASKER CERTIFIED SOLUTION
Avatar of sunnycoder
sunnycoder
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lwinkenb
lwinkenb

ASKER

Thanks sunny :)