Sorry another similar question related to this
How do I read in a string
"DOB = 10-10-1970"
from a file and assign it to char arrays dob1, dob2 and dob3...?
this is my code
It doesn't seem to work when I print them out
fgets(buffer, 40, fp);
sscanf(buffer, "DOB = %2c-%2c-%4c\n", custList[i].dob1, custList[i].dob2, custList[i].dob3);
when I puts the three variables...
This is the text file :
Account Id = 123
Name = Matt Damon
Address = 465 Ripley Boulevard, Oscar Mansion, Singapore 7666322
DOB = 10-10-1970
Phone Number = 790-3233
Account Balance = 405600.00